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
Event Timeline
lib/Transforms/InstCombine/InstCombineCompares.cpp | ||
---|---|---|
981–983 | 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 | There are all these Constant::get()/ConstantInt::get() overloads that don't require APInt. |
There are all these Constant::get()/ConstantInt::get() overloads that don't require APInt.
Have you checked they aren't sufficient?