diff options
author | Joel Jones <joel_k_jones@apple.com> | 2012-06-18 14:51:32 +0000 |
---|---|---|
committer | Joel Jones <joel_k_jones@apple.com> | 2012-06-18 14:51:32 +0000 |
commit | 96ef284da415cccd60cf5066929a4683dec5dd79 (patch) | |
tree | 8c4a5b1f78f50c341fa19da6eab740c2801797ef /test | |
parent | 457dfbac8ac1e502f5ce2b86daa80b3c7db5bd08 (diff) | |
download | external_llvm-96ef284da415cccd60cf5066929a4683dec5dd79.zip external_llvm-96ef284da415cccd60cf5066929a4683dec5dd79.tar.gz external_llvm-96ef284da415cccd60cf5066929a4683dec5dd79.tar.bz2 |
This change handles a another case for generating the bic instruction
when a compile time constant is known. This occurs when implicitly zero
extending function arguments from 16 bits to 32 bits. The 8 bit case doesn't
need to be handled, as the 8 bit constants are encoded directly, thereby
not needing a separate load instruction to form the constant into a register.
<rdar://problem/11481151>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158659 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/ARM/bicZext.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/bicZext.ll b/test/CodeGen/ARM/bicZext.ll new file mode 100644 index 0000000..cf4b7ba --- /dev/null +++ b/test/CodeGen/ARM/bicZext.ll @@ -0,0 +1,19 @@ +; RUN: llc %s -o - | FileCheck %s +; ModuleID = 'bic.c' +target triple = "thumbv7-apple-ios3.0.0" + +define zeroext i16 @foo16(i16 zeroext %f) nounwind readnone optsize ssp { +entry: + ; CHECK: .thumb_func _foo16 + ; CHECK: {{bic[^#]*#3}} + %and = and i16 %f, -4 + ret i16 %and +} + +define i32 @foo32(i32 %f) nounwind readnone optsize ssp { +entry: + ; CHECK: .thumb_func _foo32 + ; CHECK: {{bic[^#]*#3}} + %and = and i32 %f, -4 + ret i32 %and +} |