Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / PowerPC / inline-asm-matching-ppc-vsx.c
blob842e9b533a9745490e586f643b0ed4133fb66f9d
1 // REQUIRES: powerpc-registered-target
3 // RUN: %clang_cc1 -triple powerpc64le-unknown-linux-gnu -target-feature +vsx \
4 // RUN: -target-cpu pwr9 -emit-llvm %s -o - | FileCheck %s
5 // RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -target-feature +vsx \
6 // RUN: -target-cpu pwr9 -emit-llvm %s -o - | FileCheck %s
7 // RUN: %clang_cc1 -triple powerpc64-ibm-aix -target-feature +vsx \
8 // RUN: -target-cpu pwr9 -emit-llvm %s -o - | FileCheck %s
9 // RUN: %clang_cc1 -triple powerpc-ibm-aix -target-feature +vsx \
10 // RUN: -target-cpu pwr9 -emit-llvm %s -o - | FileCheck %s
12 // This case is to test VSX register support in the clobbers list for inline asm.
13 void testVSX (void) {
14 unsigned int a = 0;
15 unsigned int *dbell=&a;
16 int d;
17 __asm__ __volatile__ (
18 "lxvw4x 32, 0, %2\n\t"
19 "stxvw4x 32, 0, %1"
20 : "=m"(*(volatile unsigned int*)(dbell))
21 : "r" (dbell), "r" (&d)
22 : "vs32"
26 // CHECK: call void asm sideeffect "lxvw4x 32, 0, $2\0A\09stxvw4x 32, 0, $1", "=*m,r,r,~{vs32}"