diff options
| author | Joel Jones <joel_k_jones@apple.com> | 2012-06-04 23:38:57 +0000 |
|---|---|---|
| committer | Joel Jones <joel_k_jones@apple.com> | 2012-06-04 23:38:57 +0000 |
| commit | dd52bf2ed806229732115400b2a060204f24dea3 (patch) | |
| tree | a283639acc59dde1968c378517d5d286acebebfd /test/CodeGen | |
| parent | 84423c8778ed22877c123fe41f5e137cb5a30e90 (diff) | |
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.
<rdar://problem/11481151>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157966 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
| -rw-r--r-- | test/CodeGen/ARM/bicNoZext.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/bicNoZext.ll b/test/CodeGen/ARM/bicNoZext.ll new file mode 100644 index 0000000000..cf4b7ba0e0 --- /dev/null +++ b/test/CodeGen/ARM/bicNoZext.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 +} |
