[PATCH] D105088: [InstCombine] Fold IntToPtr/PtrToInt to bitcast
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 14 13:30:41 PDT 2021
xbolva00 added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:4574
+ Value *Op1 = simplifyIntToPtrRoundTripCast(ICmp.getOperand(1));
+ if (Op0 != ICmp.getOperand(0) || Op1 != ICmp.getOperand(1))
+ return new ICmpInst(ICmp.getPredicate(), Op0, Op1);
----------------
... and then this code can be simplified...
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:354
+ if (!Cast)
+ return Val;
+ if (Cast->getOpcode() == Instruction::IntToPtr &&
----------------
return nullptr instead Val? ...
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