[PATCH] D48223: DAG combine "and|or (select c, -1, 0), x" -> "select c, x, 0|-1"
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 15 09:11:09 PDT 2018
rampitec created this revision.
rampitec added reviewers: msearles, spatel.
Herald added subscribers: tpr, nhaehnle.
Normally this code with "and" opcode does not get to a DAG combiner
and simplified yet in the InstCombine. However AMDGPU produces it
during lowering and InstCombine has no chance to optimize it out.
In turn the same pattern with "or" opcode can reach DAG.
Since non-constant operand of and/or is now accepted both LHS and
RHS are now checked for select instruction.
https://reviews.llvm.org/D48223
Files:
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/AMDGPU/dagcombine-select.ll
test/CodeGen/AMDGPU/udivrem.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48223.151520.patch
Type: text/x-patch
Size: 8077 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180615/0fed55ab/attachment.bin>
More information about the llvm-commits
mailing list