[PATCH] D106289: [InstCombine] Fold phi ( inttoptr/ptrtoint x ) to phi (x)
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 26 17:32:53 PDT 2021
aqjune added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp:324
+ }
+ }
+ if (!OperandWithRoundTripCast)
----------------
aqjune wrote:
> Should we exclude cases where input pointers have different types?
> After opaque pointers are introduced everything will be fine - it is a safeguard that will work until then.
For example:
```
p = phi i64 [ ptrtoint i8* %a, BB1 ], [ ptrtoint float* %b, BB2 ]
i = inttoptr p
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106289/new/
https://reviews.llvm.org/D106289
More information about the llvm-commits
mailing list