Revert "[InstCombine] Support gep nuw in icmp folds" (#118698)
[llvm-project.git] / llvm / test / MC / Sparc / sparc-assembly-exprs.s
blobe950f1635ab3afffaead3d712135b8b58a9d6826
1 ! RUN: llvm-mc %s -triple=sparc -show-encoding | FileCheck %s
2 ! RUN: llvm-mc %s -triple=sparc -filetype=obj | llvm-objdump -r -d - | FileCheck %s --check-prefix=OBJDUMP
4 ! CHECK: mov 1033, %o1 ! encoding: [0x92,0x10,0x24,0x09]
5 mov (0x400|9), %o1
6 ! CHECK: mov 60, %o2 ! encoding: [0x94,0x10,0x20,0x3c]
7 mov ((12+3)<<2), %o2
9 ! CHECK: ba symStart+4 ! encoding: [0x10,0b10AAAAAA,A,A]
10 ! CHECK: fixup A - offset: 0, value: symStart+4, kind: fixup_sparc_br22
11 ! OBJDUMP: ba 1
12 symStart:
13 b symStart + 4
15 ! CHECK: mov symEnd-symStart, %g1 ! encoding: [0x82,0x10,0b001AAAAA,A]
16 ! CHECK: fixup A - offset: 0, value: symEnd-symStart, kind: fixup_sparc_13
17 ! OBJDUMP: mov 24, %g1
18 mov symEnd - symStart, %g1
20 ! CHECK: sethi %hi(sym+10), %g2 ! encoding: [0x05,0b00AAAAAA,A,A]
21 ! CHECK: fixup A - offset: 0, value: %hi(sym+10), kind: fixup_sparc_hi22
22 ! OBJDUMP: R_SPARC_HI22 sym+0xa
23 sethi %hi(sym + 10), %g2
25 ! CHECK: call foo+40 ! encoding: [0b01AAAAAA,A,A,A]
26 ! CHECK: fixup A - offset: 0, value: foo+40, kind: fixup_sparc_call30
27 ! OBJDUMP: R_SPARC_WDISP30 foo+0x28
28 call foo + 40
30 ! CHECK: add %g1, val+100, %g1 ! encoding: [0x82,0x00,0b011AAAAA,A]
31 ! CHECK: fixup A - offset: 0, value: val+100, kind: fixup_sparc_13
32 ! OBJDUMP: R_SPARC_13 val+0x64
33 add %g1, val + 100, %g1
35 ! CHECK: add %g1, 100+val, %g2 ! encoding: [0x84,0x00,0b011AAAAA,A]
36 ! CHECK: fixup A - offset: 0, value: 100+val, kind: fixup_sparc_13
37 ! OBJDUMP: R_SPARC_13 val+0x64
38 add %g1, 100 + val, %g2
39 symEnd:
41 ! "." is exactly like a temporary symbol equated to the current line.
42 ! RUN: llvm-mc %s -triple=sparc | FileCheck %s --check-prefix=DOTEXPR
44 ! DOTEXPR: .Ltmp0
45 ! DOTEXPR-NEXT: ba .Ltmp0+8
46 b . + 8