[PATCH] D105088: [InstCombine] Fold IntToPtr/PtrToInt to bitcast
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 10 01:31:01 PDT 2021
nikic added a comment.
It would be good to pre-commit the tests, so the diff is clearly visible.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:4543
+
+ // icmp (inttoptr (ptrtoint p1)), p2 --> icmp p1, p2.
+ if (CastOp0->getOpcode() == Instruction::IntToPtr &&
----------------
The code in isEliminableCastPair() also checks that the address spaces match. Can you please add tests involving different address spaces?
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