[PATCH] D105088: [InstCombine] Fold IntToPtr/PtrToInt to bitcast
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 15 03:26:41 PDT 2021
xbolva00 added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:4575
+ Value *Op1 = simplifyIntToPtrRoundTripCast(ICmp.getOperand(1));
+ if (Op0 && Op1)
+ return new ICmpInst(ICmp.getPredicate(), Op0, Op1);
----------------
if (Op0 || Op1)
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:4576
+ if (Op0 && Op1)
+ return new ICmpInst(ICmp.getPredicate(), Op0, Op1);
+ else if (Op0)
----------------
return new ICmpInst(ICmp.getPredicate(), Op0 ? Op0 : ICmp.getOperand(0), Op1 ? Op1 : ICmp.getOperand(1));
I think you should use NewOp0 or SimplifiedO0 or something like that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105088/new/
https://reviews.llvm.org/D105088
More information about the llvm-commits
mailing list