Previously, the matching was done incorrectly for the case where
operands for FCmpInst and SelectInst were in opposite order.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
I am not aware of such cases. I've faced that when working on D33186 but later decided to work with fast math only there. But I believe that this is still useful to fix. At least someone else won't be surprised by it.
Comment Actions
Agreed - we need to fix the bug. LGTM. Please see inline comments too for some cleanup.
llvm/include/llvm/IR/PatternMatch.h | ||
---|---|---|
1118 ↗ | (On Diff #98976) | max(L, R) --> min(L, R) |
1134 ↗ | (On Diff #98976) | m_UnordFMin(L, R) --> m_UnordFMax(L, R) |
1187–1200 ↗ | (On Diff #98976) | This should be moved up with the related fmin/fmax templates. |
1194 ↗ | (On Diff #98976) | max(L, R) --> min(L, R) |
Comment Actions
@spatel Yes he does. He sent me a mail asking for me to commit it for him. Do you want to do it or do you want me to?