OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43a5f59
)
[InstSimplify] Use the getTrue/getFalse helpers and make sure we use the computed...
author
Craig Topper
<craig.topper@gmail.com>
Tue, 6 Jun 2017 07:13:13 +0000
(07:13 +0000)
committer
Craig Topper
<craig.topper@gmail.com>
Tue, 6 Jun 2017 07:13:13 +0000
(07:13 +0000)
Currently, isKnownNonEqual punts on vectors so the hardcoding to i1 doesn't matter. But I plan to fix that in a future patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304773
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Analysis/InstructionSimplify.cpp
patch
|
blob
|
history
diff --git
a/lib/Analysis/InstructionSimplify.cpp
b/lib/Analysis/InstructionSimplify.cpp
index
d5b93ca
..
55ced96
100644
(file)
--- a/
lib/Analysis/InstructionSimplify.cpp
+++ b/
lib/Analysis/InstructionSimplify.cpp
@@
-3310,9
+3310,7
@@
static Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS,
// icmp eq|ne X, Y -> false|true if X != Y
if (ICmpInst::isEquality(Pred) &&
isKnownNonEqual(LHS, RHS, Q.DL, Q.AC, Q.CxtI, Q.DT)) {
- LLVMContext &Ctx = LHS->getType()->getContext();
- return Pred == ICmpInst::ICMP_NE ?
- ConstantInt::getTrue(Ctx) : ConstantInt::getFalse(Ctx);
+ return Pred == ICmpInst::ICMP_NE ? getTrue(ITy) : getFalse(ITy);
}
if (Value *V = simplifyICmpWithBinOp(Pred, LHS, RHS, Q, MaxRecurse))