llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

InstCombine assertion at vector gep/icmp folding

Open uabjean opened this issue 8 years ago • 3 comments

Bugzilla Link 38984
Resolution FIXED
Resolved on Sep 25, 2018 00:25
Version trunk
OS Linux
Attachments reduced reproducer
CC @davidbolvansky,@RKSimon,@rotateright

Extended Description

The attached IR fails with:

opt: ../lib/IR/Value.cpp:413: void llvm::Value::doRAUW(llvm::Value *, llvm::Value::ReplaceMetadataUses): Assertion `New->getType() == getType() && "replaceAllUses of value with new value of different type!"' failed.

when invoking:

opt -instcombine -S addr_diff_reduced.ll

The reason is that InstCombiner::foldGEPICmp() sees a vector icmp that it knows to be all true and tries to replace it with an i1 true value.

uabjean avatar Sep 18 '18 13:09 uabjean

mentioned in issue llvm/llvm-bugzilla-archive#51824

RKSimon avatar Nov 27 '21 04:11 RKSimon

Fixed by rL342647.

uabjean avatar Sep 25 '18 07:09 uabjean

@​Jesper Resolve this now that D52263/rL342647 has landed?

RKSimon avatar Sep 24 '18 17:09 RKSimon