[clang] b7cf9bb - Fix regression of D157680
via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 18 00:12:23 PDT 2023
Author: XinWang10
Date: 2023-08-18T00:12:10-07:00
New Revision: b7cf9bbfde5e623e16fe8669e18aa34cbb3afafa
URL: https://github.com/llvm/llvm-project/commit/b7cf9bbfde5e623e16fe8669e18aa34cbb3afafa
DIFF: https://github.com/llvm/llvm-project/commit/b7cf9bbfde5e623e16fe8669e18aa34cbb3afafa.diff
LOG: Fix regression of D157680
Test cases in D157680 should be target specific, but miss some limit, add them back to make buildbot pass.
Reviewed By: skan, Hahnfeld
Differential Revision: https://reviews.llvm.org/D158252
Added:
Modified:
clang/test/Driver/x86-no-gather-no-scatter.cpp
llvm/test/CodeGen/X86/x86-prefer-no-gather-no-scatter.ll
Removed:
################################################################################
diff --git a/clang/test/Driver/x86-no-gather-no-scatter.cpp b/clang/test/Driver/x86-no-gather-no-scatter.cpp
index 7efcc55787c423..2e8f4615b84636 100644
--- a/clang/test/Driver/x86-no-gather-no-scatter.cpp
+++ b/clang/test/Driver/x86-no-gather-no-scatter.cpp
@@ -1,8 +1,8 @@
/// Tests -mno-gather and -mno-scatter
-// RUN: %clang -c -mno-gather -### %s 2>&1 | FileCheck --check-prefix=NOGATHER %s
-// RUN: %clang_cl -c /Qgather- -### %s 2>&1 | FileCheck --check-prefix=NOGATHER %s
+// RUN: %clang -target x86_64-unknown-linux-gnu -c -mno-gather -### %s 2>&1 | FileCheck --check-prefix=NOGATHER %s
+// RUN: %clang_cl --target=x86_64-windows -c /Qgather- -### %s 2>&1 | FileCheck --check-prefix=NOGATHER %s
// NOGATHER: "-target-feature" "+prefer-no-gather"
-// RUN: %clang -c -mno-scatter -### %s 2>&1 | FileCheck --check-prefix=NOSCATTER %s
-// RUN: %clang_cl -c /Qscatter- -### %s 2>&1 | FileCheck --check-prefix=NOSCATTER %s
+// RUN: %clang -target x86_64-unknown-linux-gnu -c -mno-scatter -### %s 2>&1 | FileCheck --check-prefix=NOSCATTER %s
+// RUN: %clang_cl --target=x86_64-windows -c /Qscatter- -### %s 2>&1 | FileCheck --check-prefix=NOSCATTER %s
// NOSCATTER: "-target-feature" "+prefer-no-scatter"
diff --git a/llvm/test/CodeGen/X86/x86-prefer-no-gather-no-scatter.ll b/llvm/test/CodeGen/X86/x86-prefer-no-gather-no-scatter.ll
index e3f3622f146d99..33250b3495a000 100644
--- a/llvm/test/CodeGen/X86/x86-prefer-no-gather-no-scatter.ll
+++ b/llvm/test/CodeGen/X86/x86-prefer-no-gather-no-scatter.ll
@@ -1,6 +1,6 @@
; Check that if option prefer-no-gather/scatter can disable gather/scatter instructions.
-; RUN: llc -mattr=+avx2,+fast-gather %s -o - | FileCheck %s --check-prefixes=GATHER
-; RUN: llc -mattr=+avx2,+fast-gather,+prefer-no-gather %s -o - | FileCheck %s --check-prefixes=NO-GATHER
+; RUN: llc -mtriple=x86_64-unknown-linux-gnu -mattr=+avx2,+fast-gather %s -o - | FileCheck %s --check-prefixes=GATHER
+; RUN: llc -mtriple=x86_64-unknown-linux-gnu -mattr=+avx2,+fast-gather,+prefer-no-gather %s -o - | FileCheck %s --check-prefixes=NO-GATHER
; RUN: llc -mtriple=x86_64-unknown-linux-gnu -mattr=+avx512vl,+avx512dq < %s | FileCheck %s --check-prefix=SCATTER
; RUN: llc -mtriple=x86_64-unknown-linux-gnu -mattr=+avx512vl,+avx512dq,+prefer-no-gather < %s | FileCheck %s --check-prefix=SCATTER-NO-GATHER
; RUN: llc -mtriple=x86_64-unknown-linux-gnu -mattr=+avx512vl,+avx512dq,+prefer-no-scatter < %s | FileCheck %s --check-prefix=GATHER-NO-SCATTER
More information about the cfe-commits
mailing list