diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-08-18 21:25:22 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-08-18 21:25:22 +0000 |
commit | 864c8702ba0da2208212e84f146fbbe5c77866ed (patch) | |
tree | f9c883fd5936ad30038ff4d41ab64299fa1b8089 /unittests/Support/DataExtractorTest.cpp | |
parent | dcd2342d32e92912cc457fe6ce4cd8a72c93c06b (diff) |
Also combine zext/sext into selects for ARM.
This turns common i1 patterns into predicated instructions:
(add (zext cc), x) -> (select cc (add x, 1), x)
(add (sext cc), x) -> (select cc (add x, -1), x)
For a function like:
unsigned f(unsigned s, int x) {
return s + (x>0);
}
We now produce:
cmp r1, #0
it gt
addgt.w r0, r0, #1
Instead of:
movs r2, #0
cmp r1, #0
it gt
movgt r2, #1
add r0, r2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162177 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Support/DataExtractorTest.cpp')
0 files changed, 0 insertions, 0 deletions