[OpenACC] Implement 'collapse' for combined constructs.
[llvm-project.git] / llvm / test / tools / llvm-ml / rip_relative_addressing.asm
blobc005b9721c07e0a875e675902e89449ce3f19dca
1 ; RUN: llvm-ml -m32 -filetype=s %s /Fo - | FileCheck %s --check-prefixes=CHECK,CHECK-32
2 ; RUN: llvm-ml -m64 -filetype=s %s /Fo - | FileCheck %s --check-prefixes=CHECK,CHECK-64
4 .data
5 foo DWORD 28
7 bar:
8 DWORD 29
10 .code
12 t1:
13 mov eax, foo
14 ; CHECK-LABEL: t1:
15 ; CHECK-32: mov eax, dword ptr [foo]
16 ; CHECK-64: mov eax, dword ptr [rip + foo]
18 t2:
19 mov eax, [foo]
20 ; CHECK-LABEL: t2:
21 ; CHECK-32: mov eax, dword ptr [foo]
22 ; CHECK-64: mov eax, dword ptr [rip + foo]
24 t3:
25 mov eax, [foo+2]
26 ; CHECK-LABEL: t3:
27 ; CHECK-32: mov eax, dword ptr [foo+2]
28 ; CHECK-64: mov eax, dword ptr [rip + foo+2]
30 t4:
31 mov eax, [2+foo]
32 ; CHECK-LABEL: t4:
33 ; CHECK-32: mov eax, dword ptr [foo+2]
34 ; CHECK-64: mov eax, dword ptr [rip + foo+2]
36 t5:
37 mov eax, [4]
38 ; CHECK-LABEL: t5:
39 ; CHECK: mov eax, dword ptr [4]
41 t6:
42 mov eax, [foo+ebx]
43 ; CHECK-LABEL: t6:
44 ; CHECK: mov eax, dword ptr [ebx + foo]
46 t7:
47 mov eax, [bar]
48 ; CHECK-LABEL: t7:
49 ; CHECK: mov eax, dword ptr [bar]
51 t8:
52 mov eax, [t8]
53 ; CHECK-LABEL: t8:
54 ; CHECK: mov eax, dword ptr [t8]
56 t9:
57 mov eax, dword ptr [bar]
58 ; CHECK-LABEL: t9:
59 ; CHECK-32: mov eax, dword ptr [bar]
60 ; CHECK-64: mov eax, dword ptr [rip + bar]
62 t10:
63 mov ebx, dword ptr [4*eax]
64 ; CHECK: mov ebx, dword ptr [4*eax]
66 END