This came up in our out of tree target and results in a lot of cases where 'x' ends up used by both (trunc x) and (and x, 65535), causing x to no longer have one use when it really should (and ending up materializing wasted instructions later).
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Testcase? This should apply to AMDGPU for i64/i32. For AMDGPU at least, I don't think we would want this even if there are multiple uses
Comment Actions
ANDs can't turn back into truncs; trunc changes the width, AND doesn't; so I'm not *quite* sure what you mean. Either way, sounds like I need to reopen this with a (truncfree && zextfree) case, update the code to the latest revision, and find a test case.