[llvm] [InstCombine] Improve eq/ne by parts to handle ult/ugt equality pattern (PR #69884)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 24 14:02:58 PDT 2023
================
@@ -1166,7 +1166,7 @@ static Value *extractIntPart(const IntPart &P, IRBuilderBase &Builder) {
V = Builder.CreateLShr(V, P.StartBit);
Type *TruncTy = V->getType()->getWithNewBitWidth(P.NumBits);
if (TruncTy != V->getType())
- V = Builder.CreateTrunc(V, TruncTy);
+ V = Builder.CreateZExtOrTrunc(V, TruncTy);
----------------
goldsteinn wrote:
Was incorrectly setting a field. Fixed :)
https://github.com/llvm/llvm-project/pull/69884
More information about the llvm-commits
mailing list