diff options
author | Alexandros Lamprineas <alexandros.lamprineas@arm.com> | 2018-11-09 11:09:40 +0000 |
---|---|---|
committer | Alexandros Lamprineas <alexandros.lamprineas@arm.com> | 2018-11-09 11:09:40 +0000 |
commit | e15c982f6d6ae355d8fbf9c9272ac549785b68e2 (patch) | |
tree | c71b0cd236625b81cd79828b2ddb2cff38606b63 /clang/lib/Tooling/Tooling.cpp | |
parent | 52578f95c9fcf7b85beea921d401f49b2f6e9d1d (diff) | |
download | bcm5719-llvm-e15c982f6d6ae355d8fbf9c9272ac549785b68e2.tar.gz bcm5719-llvm-e15c982f6d6ae355d8fbf9c9272ac549785b68e2.zip |
[SelectionDAG] swap select_cc operands to enable folding
The DAGCombiner tries to SimplifySelectCC as follows:
select_cc(x, y, 16, 0, cc) -> shl(zext(set_cc(x, y, cc)), 4)
It can't cope with the situation of reordered operands:
select_cc(x, y, 0, 16, cc)
In that case we just need to swap the operands and invert the Condition Code:
select_cc(x, y, 16, 0, ~cc)
Differential Revision: https://reviews.llvm.org/D53236
llvm-svn: 346484
Diffstat (limited to 'clang/lib/Tooling/Tooling.cpp')
0 files changed, 0 insertions, 0 deletions