summaryrefslogtreecommitdiff
path: root/test/CodeGen/Thumb2/thumb2-eor.ll
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2010-06-24 16:50:20 +0000
committerBob Wilson <bob.wilson@apple.com>2010-06-24 16:50:20 +0000
commit789fef987f9c3dd14743731e3a6733f2f90c9778 (patch)
tree3b83bbef3de1bb1b3c2cab9eb6a4ef9f0365fe65 /test/CodeGen/Thumb2/thumb2-eor.ll
parentf0e1b8942157f4344cce36e98c7dabb230d52bf8 (diff)
PR7458: Try commuting Thumb2 instruction operands to put them into 2-address
form so they can be narrowed to 16-bit instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106762 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Thumb2/thumb2-eor.ll')
-rw-r--r--test/CodeGen/Thumb2/thumb2-eor.ll9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/CodeGen/Thumb2/thumb2-eor.ll b/test/CodeGen/Thumb2/thumb2-eor.ll
index b7e276673c4..116a1a3519a 100644
--- a/test/CodeGen/Thumb2/thumb2-eor.ll
+++ b/test/CodeGen/Thumb2/thumb2-eor.ll
@@ -9,11 +9,18 @@ define i32 @f1(i32 %a, i32 %b) {
define i32 @f2(i32 %a, i32 %b) {
; CHECK: f2:
-; CHECK: eor.w r0, r1, r0
+; CHECK: eors r0, r1
%tmp = xor i32 %b, %a
ret i32 %tmp
}
+define i32 @f2b(i32 %a, i32 %b, i32 %c) {
+; CHECK: f2b:
+; CHECK: eor.w r0, r1, r2
+ %tmp = xor i32 %b, %c
+ ret i32 %tmp
+}
+
define i32 @f3(i32 %a, i32 %b) {
; CHECK: f3:
; CHECK: eor.w r0, r0, r1, lsl #5