summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2012-03-30 19:59:02 +0000
committerJim Grosbach <grosbach@apple.com>2012-03-30 19:59:02 +0000
commitfdaab531b74a5e3a478ff19bd4520e1a560194c3 (patch)
tree2c18784aadaf6d39e35862bb5edcae73bfd5ab27 /llvm/test
parentab950c34d09a7e9dafffdf2ccc40ea83dc4e4ba0 (diff)
downloadbcm5719-llvm-fdaab531b74a5e3a478ff19bd4520e1a560194c3.tar.gz
bcm5719-llvm-fdaab531b74a5e3a478ff19bd4520e1a560194c3.zip
ARM assembler should prefer non-aliases encoding of cmp.
When an immediate is both a value [t2_]so_imm and a [t2_]so_imm_neg, we want to use the non-negated form to make sure we prefer the normal encoding, not the aliased encoding via the negation of, e.g., 'cmp.w'. llvm-svn: 153770
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/MC/ARM/basic-thumb2-instructions.s7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/test/MC/ARM/basic-thumb2-instructions.s b/llvm/test/MC/ARM/basic-thumb2-instructions.s
index 0091a9fed2b..0b8257fdb95 100644
--- a/llvm/test/MC/ARM/basic-thumb2-instructions.s
+++ b/llvm/test/MC/ARM/basic-thumb2-instructions.s
@@ -372,7 +372,8 @@ _func:
cmp sp, r6, lsr #1
cmp r2, r5, asr #24
cmp r1, r4, ror #15
- cmp r0, #-2
+ cmp r2, #-2
+ cmp r9, #1
@ CHECK: cmp.w r5, #65280 @ encoding: [0xb5,0xf5,0x7f,0x4f]
@ CHECK: cmp.w r4, r12 @ encoding: [0xb4,0xeb,0x0c,0x0f]
@@ -381,7 +382,9 @@ _func:
@ CHECK: cmp.w sp, r6, lsr #1 @ encoding: [0xbd,0xeb,0x56,0x0f]
@ CHECK: cmp.w r2, r5, asr #24 @ encoding: [0xb2,0xeb,0x25,0x6f]
@ CHECK: cmp.w r1, r4, ror #15 @ encoding: [0xb1,0xeb,0xf4,0x3f]
-@ CHECK: cmn.w r0, #2 @ encoding: [0x10,0xf1,0x02,0x0f]
+@ CHECK: cmn.w r2, #2 @ encoding: [0x12,0xf1,0x02,0x0f]
+@ CHECK: cmp.w r9, #1 @ encoding: [0xb9,0xf1,0x01,0x0f]
+
@------------------------------------------------------------------------------
@ DBG
OpenPOWER on IntegriCloud