summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2013-04-14 21:15:43 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2013-04-14 21:15:43 +0000
commit1fae19555797cad0af7db788a30dd4cc2bc63f6c (patch)
tree8c1050292a58850f2f98b99ba8d2f998da2f8f59 /clang/lib/CodeGen/CodeGenModule.cpp
parent6ebddae118f1b0f24b38e76fb0c0272ae3dcac2f (diff)
downloadbcm5719-llvm-1fae19555797cad0af7db788a30dd4cc2bc63f6c.tar.gz
bcm5719-llvm-1fae19555797cad0af7db788a30dd4cc2bc63f6c.zip
Reorders two transforms that collide with each other
One performs: (X == 13 | X == 14) -> X-13 <u 2 The other: (A == C1 || A == C2) -> (A & ~(C1 ^ C2)) == C1 The problem is that there are certain values of C1 and C2 that trigger both transforms but the first one blocks out the second, this generates suboptimal code. Reordering the transforms should be better in every case and allows us to do interesting stuff like turn: %shr = lshr i32 %X, 4 %and = and i32 %shr, 15 %add = add i32 %and, -14 %tobool = icmp ne i32 %add, 0 into: %and = and i32 %X, 240 %tobool = icmp ne i32 %and, 224 llvm-svn: 179493
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud