As per title. DAGCombiner only mathes the special case where b = 0, this patches extends the pattern to match any value of b.
Depends on D57302
Paths
| Differential D59208
[DAGCombiner] fold (addcarry (xor a, -1), b, c) -> (subcarry b, a, !c) and flip carry. ClosedPublic Authored by deadalnix on Mar 11 2019, 7:02 AM.
Details Summary As per title. DAGCombiner only mathes the special case where b = 0, this patches extends the pattern to match any value of b. Depends on D57302
Diff Detail
Event Timeline
deadalnix added inline comments.
Comment Actions Add a comment explainign what extractBooleanFlip does. By default, only flip the boolean if it is cheaper to compute.
This revision is now accepted and ready to land.Jul 14 2019, 7:51 AM Closed by commit rL366214: [DAGCombiner] fold (addcarry (xor a, -1), b, c) -> (subcarry b, a, !c) and flip… (authored by deadalnix). · Explain WhyJul 16 2019, 8:19 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 207909 lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/addcarry.ll
test/CodeGen/X86/subcarry.ll
|
NFC - this can be committed straight away?