The existing code already considered this case. Unfortunately a typo in the condition prevents it from triggering. Also the existing code, had it run, forgot to do the folding.
This fixes PR42876
Differential D65802
[DAGCombiner] Rebuild (setcc x, y, ==) from (xor (xor x, y), 1) rogfer01 on Aug 6 2019, 5:48 AM. Authored by
Details The existing code already considered this case. Unfortunately a typo in the condition prevents it from triggering. Also the existing code, had it run, forgot to do the folding. This fixes PR42876
Diff Detail
Event Timeline
Comment Actions ChangeLog:
Comment Actions ChangeLog:
Comment Actions I don't think this is legal in general unless you restrict it to i1. See https://rise4fun.com/Alive/1Hyj .
Comment Actions ChangeLog:
(Apologies it took me so long to get back to this)
Comment Actions Ping? This is mentioned in a RISC-V bug on llvm bugzilla, and seems like a nice improvement to multiple targets if we can land it. Comment Actions @rogfer01 reverse-ping? Comment Actions This looks good to land IMHO. It's a nice improvement for RISC-V, and it seems to have been sufficiently reviewed by people active with the DAGCombiner. Thanks Roger. |
That comment makes me nervous given the logic. Can we assert that N has one user and that user is a br?