This is to fix PR38984 "InstCombine assertion at vector gep/icmp folding":
https://bugs.llvm.org/show_bug.cgi?id=38984
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Transforms/InstCombine/InstCombineCompares.cpp | ||
---|---|---|
978–980 ↗ | (On Diff #166109) | Can't you use Constant::getIntegerValue(I.getType(), ICmpInst::isTrueWhenEqual(Cond))? |
Comment Actions
Roman Lebedev commented with an elegant way to create varying integer values, so this patch makes use of that. Changed name of patch to reflect that we now handle rather than ignore vector icmps.
Comment Actions
LG with a nit.
lib/Transforms/InstCombine/InstCombineCompares.cpp | ||
---|---|---|
979–980 ↗ | (On Diff #166117) | There are all these Constant::get()/ConstantInt::get() overloads that don't require APInt. |