diff options
author | Jakub Staszak <kubastaszak@gmail.com> | 2013-06-06 23:34:59 +0000 |
---|---|---|
committer | Jakub Staszak <kubastaszak@gmail.com> | 2013-06-06 23:34:59 +0000 |
commit | 6a72c84b161c176da91ddae1bd97bae7aab6d968 (patch) | |
tree | a7fa411c31dad9228afa535e29176951aba6baa8 /lib/Transforms/InstCombine | |
parent | 326ae27c4f744cc7fb43f5a413d042d54fc1ddc0 (diff) | |
download | external_llvm-6a72c84b161c176da91ddae1bd97bae7aab6d968.zip external_llvm-6a72c84b161c176da91ddae1bd97bae7aab6d968.tar.gz external_llvm-6a72c84b161c176da91ddae1bd97bae7aab6d968.tar.bz2 |
Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183461 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine')
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineMulDivRem.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp b/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp index 2761bc2..e36b762 100644 --- a/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp +++ b/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp @@ -616,8 +616,7 @@ bool InstCombiner::SimplifyDivRemOfSelect(BinaryOperator &I) { *I = SI->getOperand(NonNullOperand); Worklist.Add(BBI); } else if (*I == SelectCond) { - *I = NonNullOperand == 1 ? ConstantInt::getTrue(BBI->getContext()) : - ConstantInt::getFalse(BBI->getContext()); + *I = Builder->getInt1(NonNullOperand == 1); Worklist.Add(BBI); } } |