[clang] febe4f6 - [PowerPC][NFC] Undefine __XL_COMPAT_ALTIVEC__ in builtin lit test

Lei Huang via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 16 18:17:04 PDT 2022


Author: Lei Huang
Date: 2022-06-16T20:16:52-05:00
New Revision: febe4f650b8754188c8cde01701bc16bd4a7a696

URL: https://github.com/llvm/llvm-project/commit/febe4f650b8754188c8cde01701bc16bd4a7a696
DIFF: https://github.com/llvm/llvm-project/commit/febe4f650b8754188c8cde01701bc16bd4a7a696.diff

LOG: [PowerPC][NFC] Undefine __XL_COMPAT_ALTIVEC__ in builtin lit test

Add defines and undefines of the __XL_COMPAT_ALTIVEC__ to ensure
consistent results regardless of the default for this macro.

Added: 
    

Modified: 
    clang/test/CodeGen/PowerPC/builtins-ppc-vsx.c

Removed: 
    


################################################################################
diff  --git a/clang/test/CodeGen/PowerPC/builtins-ppc-vsx.c b/clang/test/CodeGen/PowerPC/builtins-ppc-vsx.c
index c8f32aa0ec261..780131c8a82c7 100644
--- a/clang/test/CodeGen/PowerPC/builtins-ppc-vsx.c
+++ b/clang/test/CodeGen/PowerPC/builtins-ppc-vsx.c
@@ -1,6 +1,10 @@
 // REQUIRES: powerpc-registered-target
-// RUN: %clang_cc1 -flax-vector-conversions=none -no-opaque-pointers -target-feature +altivec -target-feature +vsx -triple powerpc64-unknown-unknown -emit-llvm %s -o - | FileCheck %s
-// RUN: %clang_cc1 -flax-vector-conversions=none -no-opaque-pointers -target-feature +altivec -target-feature +vsx -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK-LE
+// RUN: %clang_cc1 -flax-vector-conversions=none -no-opaque-pointers -target-feature \
+// RUN:   +altivec -target-feature +vsx -triple powerpc64-unknown-unknown -emit-llvm \
+// RUN:   -U__XL_COMPAT_ALTIVEC__ %s -o - | FileCheck %s
+// RUN: %clang_cc1 -flax-vector-conversions=none -no-opaque-pointers -target-feature \
+// RUN:   +altivec -target-feature +vsx -triple powerpc64le-unknown-unknown \
+// RUN:   -emit-llvm -U__XL_COMPAT_ALTIVEC__ %s -o - | FileCheck %s -check-prefix=CHECK-LE
 #include <altivec.h>
 
 vector bool char vbc = { 0, 1, 0, 1, 0, 1, 0, 1,


        


More information about the cfe-commits mailing list