[PATCH] D158252: Fix regression of D157680

Wang, Xin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 17 23:53:37 PDT 2023


XinWang10 created this revision.
Herald added a subscriber: pengfei.
Herald added a project: All.
XinWang10 requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

Test cases in D157680 <https://reviews.llvm.org/D157680> should be target specific, but miss some limit, add them back to make buildbot pass.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D158252

Files:
  clang/test/Driver/x86-no-gather-no-scatter.cpp
  llvm/test/CodeGen/X86/x86-prefer-no-gather-no-scatter.ll


Index: llvm/test/CodeGen/X86/x86-prefer-no-gather-no-scatter.ll
===================================================================
--- llvm/test/CodeGen/X86/x86-prefer-no-gather-no-scatter.ll
+++ 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
Index: clang/test/Driver/x86-no-gather-no-scatter.cpp
===================================================================
--- clang/test/Driver/x86-no-gather-no-scatter.cpp
+++ 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"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158252.551400.patch
Type: text/x-patch
Size: 2396 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230818/fc22497d/attachment.bin>


More information about the cfe-commits mailing list