diff options
| author | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2013-02-01 02:14:03 +0000 |
|---|---|---|
| committer | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2013-02-01 02:14:03 +0000 |
| commit | 2fe4c67374ae453dd652c311677e52e0181df518 (patch) | |
| tree | 6c8d67634d023d9f6e096a495565a9909175f3f8 /clang/test/CodeGen | |
| parent | af02bbe84f653125d50bfded5f854baf48c307f9 (diff) | |
| download | bcm5719-llvm-2fe4c67374ae453dd652c311677e52e0181df518.tar.gz bcm5719-llvm-2fe4c67374ae453dd652c311677e52e0181df518.zip | |
Enable -fno-altivec, -mno-altivec for PowerPC.
Introduces these negation forms explicitly and uses them to control a new
"altivec" target feature for PowerPC. This allows avoiding generating
Altivec instructions on processors that support Altivec.
The new test case verifies that the Altivec "lvx" instruction is not
used when -fno-altivec is present on the command line.
llvm-svn: 174140
Diffstat (limited to 'clang/test/CodeGen')
| -rw-r--r-- | clang/test/CodeGen/ppc-no-altivec.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGen/ppc-no-altivec.c b/clang/test/CodeGen/ppc-no-altivec.c new file mode 100644 index 00000000000..1830f268dd3 --- /dev/null +++ b/clang/test/CodeGen/ppc-no-altivec.c @@ -0,0 +1,12 @@ +// REQUIRES: ppc64-registered-target +// RUN: %clang_cc1 %s -triple=powerpc64-unknown-linux-gnu -S -o - | FileCheck %s + +typedef char v8qi __attribute__((vector_size (8))); + +extern v8qi x, y; + +v8qi foo (void) { + return x + y; +} + +// CHECK-NOT: lvx |

