aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/ConstantFold.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-04-12 07:34:30 +0000
committerFangrui Song <maskray@google.com>2019-04-12 07:34:30 +0000
commitd5c404246f9f44440f16cafaca36d55763e82f34 (patch)
treee18ae0f79747e30639363f0149950fc676deb337 /llvm/lib/IR/ConstantFold.cpp
parent85ce053d7e2614d65b3506b3a32748c8454f3810 (diff)
downloadllvm-d5c404246f9f44440f16cafaca36d55763e82f34.zip
llvm-d5c404246f9f44440f16cafaca36d55763e82f34.tar.gz
llvm-d5c404246f9f44440f16cafaca36d55763e82f34.tar.bz2
[ConstantFold] Don't evaluate FP or FP vector casts or truncations when simplifying icmp
Fix PR41476 llvm-svn: 358262
Diffstat (limited to 'llvm/lib/IR/ConstantFold.cpp')
-rw-r--r--llvm/lib/IR/ConstantFold.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/ConstantFold.cpp b/llvm/lib/IR/ConstantFold.cpp
index 3c01a48..1dfd528 100644
--- a/llvm/lib/IR/ConstantFold.cpp
+++ b/llvm/lib/IR/ConstantFold.cpp
@@ -1574,7 +1574,7 @@ static ICmpInst::Predicate evaluateICmpRelation(Constant *V1, Constant *V2,
case Instruction::ZExt:
case Instruction::SExt:
// We can't evaluate floating point casts or truncations.
- if (CE1Op0->getType()->isFloatingPointTy())
+ if (CE1Op0->getType()->isFPOrFPVectorTy())
break;
// If the cast is not actually changing bits, and the second operand is a