ValueTracking was recognizing not all variations of clamp. Swapping of
true value and false value of select was added to fix this problem. We
break canonical form only for clamp pattern recognition. The first patch
was reverted because it caused miscompile in NVPTX target. Added
corresponding test cases.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
It seems less confusing to me to just make a clamp helper function where we do the swap locally without affecting anyone else. See attached patch proposal.
Comment Actions
Sanjay, thank you very much! I agree that solution with helper function looks better.