[PATCH] D30852: StructurizeCFG: Directly invert cmp instructions
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 10 16:00:36 PST 2017
arsenm created this revision.
Herald added subscribers: nhaehnle, wdng.
The most common case for a branch condition is
a single use compare. Directly invert the branch
predicate rather than adding a lot of xor i1 true
which the DAG will have to fold later.
This produces nicer to read structurizer output.
This produces some random changes in codegen
due to the DAG swapping branch conditions itself,
and then does a poor job of dealing with those
inverts.
https://reviews.llvm.org/D30852
Files:
lib/Transforms/Scalar/StructurizeCFG.cpp
test/CodeGen/AMDGPU/loop_break.ll
test/CodeGen/AMDGPU/multi-divergent-exit-region.ll
test/CodeGen/AMDGPU/ret_jump.ll
test/Transforms/StructurizeCFG/one-loop-multiple-backedges.ll
test/Transforms/StructurizeCFG/post-order-traversal-bug.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30852.91430.patch
Type: text/x-patch
Size: 17416 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170311/ac44c98a/attachment-0001.bin>
More information about the llvm-commits
mailing list