diff options
author | Bill Wendling <isanbard@gmail.com> | 2009-03-26 01:47:50 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2009-03-26 01:47:50 +0000 |
commit | 94f299f2c53783c57f29afb3c226403f550e5557 (patch) | |
tree | c2bc123fcb036a1f0a6f5b9e829723f0d089cb01 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 189d67181c800c46ef03ca45f35cc4acf9da2395 (diff) | |
download | bcm5719-llvm-94f299f2c53783c57f29afb3c226403f550e5557.tar.gz bcm5719-llvm-94f299f2c53783c57f29afb3c226403f550e5557.zip |
Match this pattern so that we can generate simpler code:
%a = ...
%b = and i32 %a, 2
%c = srl i32 %b, 1
%d = br i32 %c,
into
%a = ...
%b = and %a, 2
%c = X86ISD::CMP %b, 0
%d = X86ISD::BRCOND %c ...
This applies only when the AND constant value has one bit set and the SRL
constant is equal to the log2 of the AND constant. The back-end is smart enough
to convert the result into a TEST/JMP sequence.
llvm-svn: 67728
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions