Try to simplify cast in similar way as for GEP and ADD with constant (e.g. sext/zext + trunc).
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Analysis/PHITransAddr.cpp | ||
---|---|---|
189 | I'm fine with isSafeToSpeculativelyExecute part, it seems reasonable. But this doesn't seem to be NFC while whole patch claims it's an NFC. Should it be 2 different patches? |
llvm/lib/Analysis/PHITransAddr.cpp | ||
---|---|---|
189 | I agree, after this change it can fold zext/sext + trunc for example (didn't see any changes on test-suite though). |
llvm/lib/Analysis/PHITransAddr.cpp | ||
---|---|---|
189 | Can you write a test yourself? |
Please add a test. If you can't figure it out yourself, you can insert an assert and run a big enough tests corps to see if something changed, and then use bugpoint to reduce it. Good luck!
Separate patch for removing isSafeToSpeculativelyExecute() checks: https://reviews.llvm.org/D143255
Looks reasonable. I'm not familiar with this code part in general, so please wait some time in case if someone has concerns, but looks pretty straightforward.
I'm fine with isSafeToSpeculativelyExecute part, it seems reasonable. But this doesn't seem to be NFC while whole patch claims it's an NFC. Should it be 2 different patches?