-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[GVN/PRE] Remove triple from GVN/PRE tests #129073
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-llvm-transforms Author: Madhur Amilkanthwar (madhur13490) ChangesThe tests changed in the patch are running only Full diff: https://github.com/llvm/llvm-project/pull/129073.diff 7 Files Affected:
diff --git a/llvm/test/Transforms/GVN/PRE/2009-06-17-InvalidPRE.ll b/llvm/test/Transforms/GVN/PRE/2009-06-17-InvalidPRE.ll
index 506ad7ce6cd35..54e3496ae34e6 100644
--- a/llvm/test/Transforms/GVN/PRE/2009-06-17-InvalidPRE.ll
+++ b/llvm/test/Transforms/GVN/PRE/2009-06-17-InvalidPRE.ll
@@ -1,10 +1,10 @@
-; RUN: opt < %s -passes=gvn -enable-load-pre -S | FileCheck %s
+; RUN: opt < %s -passes=gvn -enable-load-pre -S -mtriple=aarch64-linux-gnu | FileCheck %s
+; RUN: opt < %s -passes=gvn -enable-load-pre -S -mtriple=i386-apple-darwin9.6 | FileCheck %s
; CHECK-NOT: pre1
; GVN load pre was hoisting the loads at %13 and %16 up to bb4.outer.
; This is invalid as it bypasses the check for %m.0.ph==null in bb4.
; ModuleID = 'mbuf.c'
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
-target triple = "i386-apple-darwin9.6"
%struct.mbuf = type { ptr, ptr, i32, ptr, i16, i16, i32 }
define void @m_adj(ptr %mp, i32 %req_len) nounwind optsize {
diff --git a/llvm/test/Transforms/GVN/PRE/2011-06-01-NonLocalMemdepMiscompile.ll b/llvm/test/Transforms/GVN/PRE/2011-06-01-NonLocalMemdepMiscompile.ll
index 3f0475dc79ca2..af0b0cba3e135 100644
--- a/llvm/test/Transforms/GVN/PRE/2011-06-01-NonLocalMemdepMiscompile.ll
+++ b/llvm/test/Transforms/GVN/PRE/2011-06-01-NonLocalMemdepMiscompile.ll
@@ -1,10 +1,10 @@
-; RUN: opt < %s -passes='require<loops>,gvn' -S | FileCheck %s
+; RUN: opt < %s -passes='require<loops>,gvn' -S -mtriple=x86_64-apple-macosx10.7.0 | FileCheck %s
+; RUN: opt < %s -passes='require<loops>,gvn' -S -mtriple=aarch64-linux-gnu | FileCheck %s
; This test is checking that (a) this doesn't crash, and (b) we don't
; conclude the value of %tmp17 is available in bb1.bb15_crit_edge.
; rdar://9429882
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
-target triple = "x86_64-apple-macosx10.7.0"
define i1 @rb_intern(ptr %foo) nounwind ssp {
; CHECK-LABEL: @rb_intern(
diff --git a/llvm/test/Transforms/GVN/PRE/atomic.ll b/llvm/test/Transforms/GVN/PRE/atomic.ll
index e8bf25548ba89..64d3f0b61ff18 100644
--- a/llvm/test/Transforms/GVN/PRE/atomic.ll
+++ b/llvm/test/Transforms/GVN/PRE/atomic.ll
@@ -1,8 +1,8 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
-; RUN: opt -passes=gvn -S < %s | FileCheck %s
+; RUN: opt -mtriple=aarch64-linux-gnu -S -passes=gvn < %s | FileCheck %s
+; RUN: opt -mtriple=x86_64-apple-macosx10.7.0 -S -passes=gvn < %s | FileCheck %s
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
-target triple = "x86_64-apple-macosx10.7.0"
@x = common global i32 0, align 4
@y = common global i32 0, align 4
diff --git a/llvm/test/Transforms/GVN/PRE/load-pre-licm.ll b/llvm/test/Transforms/GVN/PRE/load-pre-licm.ll
index 7028edb4732bd..0801d6043e0bd 100644
--- a/llvm/test/Transforms/GVN/PRE/load-pre-licm.ll
+++ b/llvm/test/Transforms/GVN/PRE/load-pre-licm.ll
@@ -1,7 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -passes=gvn < %s | FileCheck %s
+; RUN: opt -mtriple=aarch64-linux-gnu -S -passes=gvn < %s | FileCheck %s
+; RUN: opt -mtriple=i386-apple-darwin11.0.0 -S -passes=gvn < %s | FileCheck %s
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32"
-target triple = "i386-apple-darwin11.0.0"
@sortlist = external global [5001 x i32], align 4
diff --git a/llvm/test/Transforms/GVN/PRE/lpre-call-wrap-2.ll b/llvm/test/Transforms/GVN/PRE/lpre-call-wrap-2.ll
index 177b8a080bb0a..24c2aa091ac24 100644
--- a/llvm/test/Transforms/GVN/PRE/lpre-call-wrap-2.ll
+++ b/llvm/test/Transforms/GVN/PRE/lpre-call-wrap-2.ll
@@ -1,4 +1,5 @@
-; RUN: opt -S -passes=gvn -enable-load-pre < %s | FileCheck %s
+; RUN: opt -mtriple=aarch64-linux-gnu -S -passes=gvn -enable-load-pre < %s | FileCheck %s
+; RUN: opt -mtriple=i386-apple-darwin7 -S -passes=gvn -enable-load-pre < %s | FileCheck %s
;
; The partially redundant load in bb1 should be hoisted to "bb". This comes
; from this C code (GCC PR 23455):
@@ -10,7 +11,6 @@
; outbuf[outcnt] = bi_buf;
; }
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
-target triple = "i386-apple-darwin7"
@outcnt = common global i32 0 ; <ptr> [#uses=3]
define void @bi_windup(ptr %outbuf, i8 zeroext %bi_buf) nounwind {
diff --git a/llvm/test/Transforms/GVN/PRE/lpre-call-wrap.ll b/llvm/test/Transforms/GVN/PRE/lpre-call-wrap.ll
index 1f6a5c7a11a89..9241cf49a9a87 100644
--- a/llvm/test/Transforms/GVN/PRE/lpre-call-wrap.ll
+++ b/llvm/test/Transforms/GVN/PRE/lpre-call-wrap.ll
@@ -1,5 +1,6 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -passes=gvn -enable-load-pre < %s | FileCheck %s
+; RUN: opt -mtriple=aarch64-linux-gnu -S -passes=gvn -enable-load-pre < %s | FileCheck %s
+; RUN: opt -mtriple=i386-apple-darwin7 -S -passes=gvn -enable-load-pre < %s | FileCheck %s
;
; Make sure the load in bb3.backedge is removed and moved into bb1 after the
; call. This makes the non-call case faster.
@@ -15,7 +16,6 @@
; void testfunction(A& iter) { A const end; while (iter != end) ++iter; }
;
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
-target triple = "i386-apple-darwin7"
%struct.A = type { i32, i32 }
define void @_Z12testfunctionR1A(ptr %iter) {
diff --git a/llvm/test/Transforms/GVN/PRE/rle-phi-translate.ll b/llvm/test/Transforms/GVN/PRE/rle-phi-translate.ll
index 519e0ca29a971..08e4235715fa9 100644
--- a/llvm/test/Transforms/GVN/PRE/rle-phi-translate.ll
+++ b/llvm/test/Transforms/GVN/PRE/rle-phi-translate.ll
@@ -1,7 +1,7 @@
-; RUN: opt < %s -passes=gvn -S | FileCheck %s
+; RUN: opt < %s -mtriple=aarch64-linux-gnu -S -passes=gvn | FileCheck %s
+; RUN: opt < %s -mtriple=i386-apple-darwin7 -S -passes=gvn | FileCheck %s
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
-target triple = "i386-apple-darwin7"
define i32 @test1(ptr %b, ptr %c) nounwind {
; CHECK-LABEL: @test1(
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests should not care about the target triple at all. Please just drop the triples from the test files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are the triples actually needed?
0698994
to
f200b9c
Compare
@@ -1,7 +1,7 @@ | |||
; RUN: opt < %s -passes=gvn -S | FileCheck %s | |||
; RUN: opt < %s -S -passes=gvn | FileCheck %s | |||
; RUN: opt < %s -S -passes=gvn | FileCheck %s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate run line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, removed
f200b9c
to
b57e99c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but please update the PR title + description.
The tests in GVN/PRE need not to depend on target triple. Removing the triple dependence from all the tests in this directory.
b57e99c
to
7426c39
Compare
The tests in GVN/PRE need not to depend on target triple. Removing the triple dependence from all the tests in this directory.
The tests in GVN/PRE need not to depend on target triple. Removing the triple dependence from all the tests in this directory.