|
| 1 | +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py |
1 | 2 | ; RUN: llc < %s | FileCheck %s
|
2 | 3 |
|
3 | 4 | target triple = "x86_64-unknown-linux-gnu"
|
4 | 5 |
|
5 | 6 | define void @load1(i8* nocapture readonly %x) {
|
6 |
| -; CHECK: pushq %rax |
7 |
| -; CHECK-NOT: push %rbp |
8 |
| -; CHECK: callq __asan_check_load_add_1_[[REG1:.*]] |
9 |
| -; CHECK: callq __asan_check_store_add_1_[[REG1]] |
10 |
| -; CHECK-NOT: pop %rbp |
11 |
| -; CHECK: popq %rax |
| 7 | +; CHECK-LABEL: load1: |
| 8 | +; CHECK: # %bb.0: |
| 9 | +; CHECK-NEXT: pushq %rax |
| 10 | +; CHECK-NEXT: .cfi_def_cfa_offset 16 |
| 11 | +; CHECK-NEXT: callq __asan_check_load_add_1_RDI |
| 12 | +; CHECK-NEXT: callq __asan_check_store_add_1_RDI |
| 13 | +; CHECK-NEXT: popq %rax |
| 14 | +; CHECK-NEXT: .cfi_def_cfa_offset 8 |
| 15 | +; CHECK-NEXT: retq |
12 | 16 | call void @llvm.asan.check.memaccess(i8* %x, i32 0)
|
13 | 17 | call void @llvm.asan.check.memaccess(i8* %x, i32 32)
|
14 | 18 | ret void
|
15 | 19 | }
|
16 | 20 |
|
17 |
| -define void @load2(i16* nocapture readonly %x) { |
18 |
| -; CHECK: pushq %rax |
19 |
| -; CHECK-NOT: push %rbp |
20 |
| -; CHECK: callq __asan_check_load_add_2_[[REG2:.*]] |
21 |
| -; CHECK: callq __asan_check_store_add_2_[[REG2]] |
22 |
| -; CHECK-NOT: pop %rbp |
23 |
| -; CHECK: popq %rax |
| 21 | +define void @load2(i16* nocapture readonly %x) nounwind { |
| 22 | +; CHECK-LABEL: load2: |
| 23 | +; CHECK: # %bb.0: |
| 24 | +; CHECK-NEXT: pushq %rax |
| 25 | +; CHECK-NEXT: callq __asan_check_load_add_2_RDI |
| 26 | +; CHECK-NEXT: callq __asan_check_store_add_2_RDI |
| 27 | +; CHECK-NEXT: popq %rax |
| 28 | +; CHECK-NEXT: retq |
24 | 29 | %1 = ptrtoint i16* %x to i64
|
25 | 30 | %2 = bitcast i16* %x to i8*
|
26 | 31 | call void @llvm.asan.check.memaccess(i8* %2, i32 2)
|
27 | 32 | call void @llvm.asan.check.memaccess(i8* %2, i32 34)
|
28 | 33 | ret void
|
29 | 34 | }
|
30 | 35 |
|
31 |
| -define void @load4(i32* nocapture readonly %x) { |
32 |
| -; CHECK: pushq %rax |
33 |
| -; CHECK-NOT: push %rbp |
34 |
| -; CHECK: callq __asan_check_load_add_4_[[REG4:.*]] |
35 |
| -; CHECK: callq __asan_check_store_add_4_[[REG4]] |
36 |
| -; CHECK-NOT: pop %rbp |
37 |
| -; CHECK: popq %rax |
| 36 | +define void @load4(i32* nocapture readonly %x) nounwind { |
| 37 | +; CHECK-LABEL: load4: |
| 38 | +; CHECK: # %bb.0: |
| 39 | +; CHECK-NEXT: pushq %rax |
| 40 | +; CHECK-NEXT: callq __asan_check_load_add_4_RDI |
| 41 | +; CHECK-NEXT: callq __asan_check_store_add_4_RDI |
| 42 | +; CHECK-NEXT: popq %rax |
| 43 | +; CHECK-NEXT: retq |
38 | 44 | %1 = ptrtoint i32* %x to i64
|
39 | 45 | %2 = bitcast i32* %x to i8*
|
40 | 46 | call void @llvm.asan.check.memaccess(i8* %2, i32 4)
|
41 | 47 | call void @llvm.asan.check.memaccess(i8* %2, i32 36)
|
42 | 48 | ret void
|
43 | 49 | }
|
44 |
| -define void @load8(i64* nocapture readonly %x) { |
45 |
| -; CHECK: pushq %rax |
46 |
| -; CHECK-NOT: push %rbp |
47 |
| -; CHECK: callq __asan_check_load_add_8_[[REG8:.*]] |
48 |
| -; CHECK: callq __asan_check_store_add_8_[[REG8]] |
49 |
| -; CHECK-NOT: pop %rbp |
50 |
| -; CHECK: popq %rax |
| 50 | + |
| 51 | +define void @load8(i64* nocapture readonly %x) nounwind { |
| 52 | +; CHECK-LABEL: load8: |
| 53 | +; CHECK: # %bb.0: |
| 54 | +; CHECK-NEXT: pushq %rax |
| 55 | +; CHECK-NEXT: callq __asan_check_load_add_8_RDI |
| 56 | +; CHECK-NEXT: callq __asan_check_store_add_8_RDI |
| 57 | +; CHECK-NEXT: popq %rax |
| 58 | +; CHECK-NEXT: retq |
51 | 59 | %1 = ptrtoint i64* %x to i64
|
52 | 60 | %2 = bitcast i64* %x to i8*
|
53 | 61 | call void @llvm.asan.check.memaccess(i8* %2, i32 6)
|
54 | 62 | call void @llvm.asan.check.memaccess(i8* %2, i32 38)
|
55 | 63 | ret void
|
56 | 64 | }
|
57 | 65 |
|
58 |
| -define void @load16(i128* nocapture readonly %x) { |
59 |
| -; CHECK: pushq %rax |
60 |
| -; CHECK-NOT: push %rbp |
61 |
| -; CHECK: callq __asan_check_load_add_16_[[REG16:.*]] |
62 |
| -; CHECK: callq __asan_check_store_add_16_[[REG16]] |
63 |
| -; CHECK-NOT: pop %rbp |
64 |
| -; CHECK: popq %rax |
| 66 | +define void @load16(i128* nocapture readonly %x) nounwind { |
| 67 | +; CHECK-LABEL: load16: |
| 68 | +; CHECK: # %bb.0: |
| 69 | +; CHECK-NEXT: pushq %rax |
| 70 | +; CHECK-NEXT: callq __asan_check_load_add_16_RDI |
| 71 | +; CHECK-NEXT: callq __asan_check_store_add_16_RDI |
| 72 | +; CHECK-NEXT: popq %rax |
| 73 | +; CHECK-NEXT: retq |
65 | 74 | %1 = ptrtoint i128* %x to i64
|
66 | 75 | %2 = bitcast i128* %x to i8*
|
67 | 76 | call void @llvm.asan.check.memaccess(i8* %2, i32 8)
|
|
0 commit comments