xref: /llvm-project/clang/test/CodeGen/AArch64/fix-cortex-a53-835769.c (revision 207e5ccceec8d3cc3f32723e78f2a142bc61b07d)
1*207e5cccSFangrui Song // RUN: %clang -O3 --target=aarch64 %s -S -o- \
2*207e5cccSFangrui Song // RUN:   | FileCheck --check-prefix=CHECK-NO --check-prefix=CHECK %s
3*207e5cccSFangrui Song // RUN: %clang -O3 --target=aarch64 -mfix-cortex-a53-835769 %s -S -o- 2>&1 \
4*207e5cccSFangrui Song // RUN:   | FileCheck --check-prefix=CHECK-YES --check-prefix=CHECK %s
5*207e5cccSFangrui Song // RUN: %clang -O3 --target=aarch64 -mno-fix-cortex-a53-835769 %s -S -o- 2>&1 \
6*207e5cccSFangrui Song // RUN:   | FileCheck --check-prefix=CHECK-NO --check-prefix=CHECK %s
7*207e5cccSFangrui Song 
8*207e5cccSFangrui Song // RUN: %clang -O3 --target=aarch64-linux-androideabi %s -S -o- \
9*207e5cccSFangrui Song // RUN:   | FileCheck --check-prefix=CHECK-YES --check-prefix=CHECK %s
10*207e5cccSFangrui Song // RUN: %clang -O3 -target aarch64-linux-ohos %s -S -o- \
11*207e5cccSFangrui Song // RUN:   | FileCheck --check-prefix=CHECK-YES --check-prefix=CHECK %s
12*207e5cccSFangrui Song // RUN: %clang -O3 --target=aarch64-linux-androideabi -mfix-cortex-a53-835769 %s -S -o- \
13*207e5cccSFangrui Song // RUN:   | FileCheck --check-prefix=CHECK-YES --check-prefix=CHECK %s
14*207e5cccSFangrui Song // RUN: %clang -O3 --target=aarch64-linux-androideabi -mno-fix-cortex-a53-835769 %s -S -o- \
15*207e5cccSFangrui Song // RUN:   | FileCheck --check-prefix=CHECK-NO --check-prefix=CHECK %s
16*207e5cccSFangrui Song 
17*207e5cccSFangrui Song // REQUIRES: aarch64-registered-target
18*207e5cccSFangrui Song 
19*207e5cccSFangrui Song typedef long int64_t;
20*207e5cccSFangrui Song 
21*207e5cccSFangrui Song int64_t f_load_madd_64(int64_t a, int64_t b, int64_t *c) {
22*207e5cccSFangrui Song     int64_t result = a+b*(*c);
23*207e5cccSFangrui Song     return result;
24*207e5cccSFangrui Song }
25*207e5cccSFangrui Song 
26*207e5cccSFangrui Song // CHECK: ldr
27*207e5cccSFangrui Song // CHECK-YES-NEXT: nop
28*207e5cccSFangrui Song // CHECK-NO-NOT: nop
29*207e5cccSFangrui Song // CHECK-NEXT: madd
30