[llvm] [NVPTX] Implement isTruncateFree and isZExtFree for i32/i64 Optimizations (PR #114683)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 4 11:57:26 PST 2024


Artem-B wrote:

@justinfargnoli has also pointed you at a the code processing IR which would be affected by your changes, 
His example is simlar to what I've suggested, only uses select instead of add: `trunc (select c, a, b) -> select c, (trunc a), (trunc b)`

You should create an function which does that (or, find an existing example that may already exist). 
I would check the git blame for the code @justinfargnoli pointed at, and look at the tests that were committed when the optimization was implemented. That may give you an example of what kind of tests you may want to add to this PR.

https://github.com/llvm/llvm-project/pull/114683


More information about the llvm-commits mailing list