From 5b4b842ffb0952ce4a8949962a9857b6520fca39 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Thu, 8 Dec 2022 02:27:24 +0300 Subject: [PATCH] [NFC] Port all InstSimplify tests to `-passes=` syntax --- llvm/test/Transforms/InstSimplify/2011-10-27-BinOpCrash.ll | 2 +- .../InstSimplify/ConstProp/2002-09-03-SetCC-Bools.ll | 2 +- .../InstSimplify/ConstProp/2006-12-01-TruncBoolBug.ll | 2 +- llvm/test/Transforms/InstSimplify/ConstProp/basictest.ll | 14 +++++++------- llvm/test/Transforms/InstSimplify/ConstProp/div-zero.ll | 2 +- llvm/test/Transforms/InstSimplify/ConstProp/gep-alias.ll | 2 +- .../InstSimplify/ConstProp/gep-constanfolding-error.ll | 2 +- llvm/test/Transforms/InstSimplify/ConstProp/gep.ll | 2 +- llvm/test/Transforms/InstSimplify/ConstProp/icmp-global.ll | 2 +- llvm/test/Transforms/InstSimplify/ConstProp/logicaltest.ll | 2 +- llvm/test/Transforms/InstSimplify/ConstProp/phi.ll | 2 +- llvm/test/Transforms/InstSimplify/ConstProp/remtest.ll | 2 +- .../Transforms/InstSimplify/ConstProp/vectorgep-crash.ll | 4 ++-- .../InstSimplify/ConstProp/vscale-inseltpoison.ll | 2 +- llvm/test/Transforms/InstSimplify/ConstProp/vscale.ll | 2 +- llvm/test/Transforms/InstSimplify/add_vp.ll | 2 +- llvm/test/Transforms/InstSimplify/and-or-implied-cond.ll | 2 +- .../Transforms/InstSimplify/constant-fold-fp-denormal.ll | 2 +- .../InstSimplify/named-vector-shuffle-reverse.ll | 2 +- llvm/test/Transforms/InstSimplify/opaque-ptr.ll | 2 +- llvm/test/Transforms/InstSimplify/pr33957.ll | 2 +- .../Transforms/InstSimplify/simplify-nested-bitcast.ll | 2 +- llvm/test/Transforms/InstSimplify/vscale-inseltpoison.ll | 2 +- llvm/test/Transforms/InstSimplify/vscale.ll | 2 +- 24 files changed, 31 insertions(+), 31 deletions(-) diff --git a/llvm/test/Transforms/InstSimplify/2011-10-27-BinOpCrash.ll b/llvm/test/Transforms/InstSimplify/2011-10-27-BinOpCrash.ll index 549e994..fcb98bb 100644 --- a/llvm/test/Transforms/InstSimplify/2011-10-27-BinOpCrash.ll +++ b/llvm/test/Transforms/InstSimplify/2011-10-27-BinOpCrash.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -instcombine +; RUN: opt < %s -passes=instcombine @_ZN11xercesc_2_5L11gDigitCharsE = external constant [32 x i16], align 2 @_ZN11xercesc_2_5L10gBaseCharsE = external constant [354 x i16], align 2 diff --git a/llvm/test/Transforms/InstSimplify/ConstProp/2002-09-03-SetCC-Bools.ll b/llvm/test/Transforms/InstSimplify/ConstProp/2002-09-03-SetCC-Bools.ll index 81a64f9..3bdca60 100644 --- a/llvm/test/Transforms/InstSimplify/ConstProp/2002-09-03-SetCC-Bools.ll +++ b/llvm/test/Transforms/InstSimplify/ConstProp/2002-09-03-SetCC-Bools.ll @@ -1,6 +1,6 @@ ; SetCC on boolean values was not implemented! -; RUN: opt < %s -instsimplify -dce -S | \ +; RUN: opt < %s -passes=instsimplify,dce -S | \ ; RUN: not grep set define i1 @test1() { diff --git a/llvm/test/Transforms/InstSimplify/ConstProp/2006-12-01-TruncBoolBug.ll b/llvm/test/Transforms/InstSimplify/ConstProp/2006-12-01-TruncBoolBug.ll index ce66c70..c26498d 100644 --- a/llvm/test/Transforms/InstSimplify/ConstProp/2006-12-01-TruncBoolBug.ll +++ b/llvm/test/Transforms/InstSimplify/ConstProp/2006-12-01-TruncBoolBug.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -instcombine -S | \ +; RUN: opt < %s -passes=instcombine -S | \ ; RUN: grep "ret i1 false" define i1 @test() { %X = trunc i32 320 to i1 ; [#uses=1] diff --git a/llvm/test/Transforms/InstSimplify/ConstProp/basictest.ll b/llvm/test/Transforms/InstSimplify/ConstProp/basictest.ll index 5c8f747..7529008 100644 --- a/llvm/test/Transforms/InstSimplify/ConstProp/basictest.ll +++ b/llvm/test/Transforms/InstSimplify/ConstProp/basictest.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -instsimplify -dce -S | FileCheck %s +; RUN: opt < %s -passes=instsimplify,dce -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-S128" target triple = "x86_64-apple-macosx10.7.2" @@ -8,17 +8,17 @@ target triple = "x86_64-apple-macosx10.7.2" define i32 @test1(i1 %B) { br i1 %B, label %BB1, label %BB2 -BB1: +BB1: %Val = add i32 0, 0 br label %BB3 -BB2: +BB2: br label %BB3 -BB3: +BB3: ; CHECK-LABEL: @test1( ; CHECK: %Ret = phi i32 [ 0, %BB1 ], [ 1, %BB2 ] - %Ret = phi i32 [ %Val, %BB1 ], [ 1, %BB2 ] + %Ret = phi i32 [ %Val, %BB1 ], [ 1, %BB2 ] ret i32 %Ret } @@ -30,7 +30,7 @@ entry: br label %bb bb: ret i1 %V - + ; CHECK-LABEL: @test2( ; CHECK: ret i1 true } @@ -50,4 +50,4 @@ define i128 @vector_to_int_cast() { ; CHECK-LABEL: @vector_to_int_cast( ; CHECK: ret i128 85070591750041656499021422275829170176 } - + diff --git a/llvm/test/Transforms/InstSimplify/ConstProp/div-zero.ll b/llvm/test/Transforms/InstSimplify/ConstProp/div-zero.ll index 22b4d8e..842b45b 100644 --- a/llvm/test/Transforms/InstSimplify/ConstProp/div-zero.ll +++ b/llvm/test/Transforms/InstSimplify/ConstProp/div-zero.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -instcombine -S | grep "ret i32 0" +; RUN: opt < %s -passes=instcombine -S | grep "ret i32 0" ; PR4424 declare void @ext() diff --git a/llvm/test/Transforms/InstSimplify/ConstProp/gep-alias.ll b/llvm/test/Transforms/InstSimplify/ConstProp/gep-alias.ll index b987f8b..bf09691 100644 --- a/llvm/test/Transforms/InstSimplify/ConstProp/gep-alias.ll +++ b/llvm/test/Transforms/InstSimplify/ConstProp/gep-alias.ll @@ -1,4 +1,4 @@ -; RUN: opt -instcombine -S -o - %s | FileCheck %s +; RUN: opt -passes=instcombine -S -o - %s | FileCheck %s ; Test that we don't replace an alias with its aliasee when simplifying GEPs. ; In this test case the transformation is invalid because it replaces the ; reference to the symbol "b" (which refers to whichever instance of "b" diff --git a/llvm/test/Transforms/InstSimplify/ConstProp/gep-constanfolding-error.ll b/llvm/test/Transforms/InstSimplify/ConstProp/gep-constanfolding-error.ll index ba0eb4b..474af2d 100644 --- a/llvm/test/Transforms/InstSimplify/ConstProp/gep-constanfolding-error.ll +++ b/llvm/test/Transforms/InstSimplify/ConstProp/gep-constanfolding-error.ll @@ -1,4 +1,4 @@ -; RUN: opt -gvn -S -o - %s | FileCheck %s +; RUN: opt -passes=gvn -S -o - %s | FileCheck %s ; RUN: opt -passes=newgvn -S -o - %s | FileCheck %s ; Test that the constantfolding getelementptr computation results in ; j[5][4][1] (j+239) diff --git a/llvm/test/Transforms/InstSimplify/ConstProp/gep.ll b/llvm/test/Transforms/InstSimplify/ConstProp/gep.ll index 54069c9..6dd34a4 100644 --- a/llvm/test/Transforms/InstSimplify/ConstProp/gep.ll +++ b/llvm/test/Transforms/InstSimplify/ConstProp/gep.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -instcombine -S -o - %s | FileCheck %s +; RUN: opt -passes=instcombine -S -o - %s | FileCheck %s ; Tests that we preserve the inrange attribute on indices where possible. target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/llvm/test/Transforms/InstSimplify/ConstProp/icmp-global.ll b/llvm/test/Transforms/InstSimplify/ConstProp/icmp-global.ll index f55a18c..701d911 100644 --- a/llvm/test/Transforms/InstSimplify/ConstProp/icmp-global.ll +++ b/llvm/test/Transforms/InstSimplify/ConstProp/icmp-global.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -instsimplify -S -verify | FileCheck %s +; RUN: opt < %s -passes=instsimplify,verify -S | FileCheck %s define i1 @ule_null_constexpr(ptr %x) { ; CHECK-LABEL: @ule_null_constexpr( diff --git a/llvm/test/Transforms/InstSimplify/ConstProp/logicaltest.ll b/llvm/test/Transforms/InstSimplify/ConstProp/logicaltest.ll index 5fbf521..28335a1b 100644 --- a/llvm/test/Transforms/InstSimplify/ConstProp/logicaltest.ll +++ b/llvm/test/Transforms/InstSimplify/ConstProp/logicaltest.ll @@ -1,6 +1,6 @@ ; Ensure constant propagation of logical instructions is working correctly. -; RUN: opt < %s -instsimplify -dce -S | FileCheck %s +; RUN: opt < %s -passes=instsimplify,dce -S | FileCheck %s ; CHECK-NOT: {{and|or|xor}} define i32 @test1() { diff --git a/llvm/test/Transforms/InstSimplify/ConstProp/phi.ll b/llvm/test/Transforms/InstSimplify/ConstProp/phi.ll index c6d2f5a..eb08d65 100644 --- a/llvm/test/Transforms/InstSimplify/ConstProp/phi.ll +++ b/llvm/test/Transforms/InstSimplify/ConstProp/phi.ll @@ -1,7 +1,7 @@ ; This is a basic correctness check for constant propagation. The add ; instruction should be eliminated. -; RUN: opt < %s -instsimplify -dce -S | not grep phi +; RUN: opt < %s -passes=instsimplify,dce -S | not grep phi define i32 @test(i1 %B) { BB0: diff --git a/llvm/test/Transforms/InstSimplify/ConstProp/remtest.ll b/llvm/test/Transforms/InstSimplify/ConstProp/remtest.ll index 39de313..5cd1071 100644 --- a/llvm/test/Transforms/InstSimplify/ConstProp/remtest.ll +++ b/llvm/test/Transforms/InstSimplify/ConstProp/remtest.ll @@ -1,6 +1,6 @@ ; Ensure constant propagation of remainder instructions is working correctly. -; RUN: opt < %s -instsimplify -dce -S | not grep rem +; RUN: opt < %s -passes=instsimplify,dce -S | not grep rem define i32 @test1() { %R = srem i32 4, 3 ; [#uses=1] diff --git a/llvm/test/Transforms/InstSimplify/ConstProp/vectorgep-crash.ll b/llvm/test/Transforms/InstSimplify/ConstProp/vectorgep-crash.ll index 2b6e461..5f55450 100644 --- a/llvm/test/Transforms/InstSimplify/ConstProp/vectorgep-crash.ll +++ b/llvm/test/Transforms/InstSimplify/ConstProp/vectorgep-crash.ll @@ -1,4 +1,4 @@ -; RUN: opt -instcombine -S -o - %s | FileCheck %s +; RUN: opt -passes=instcombine -S -o - %s | FileCheck %s ; Tests that we don't crash upon encountering a vector GEP target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" @@ -32,7 +32,7 @@ vector.body: } ; CHECK-LABEL: @test2 -; CHECK: ret <16 x ptr> getelementptr ([65 x %struct.A], ptr @G, <16 x i64> zeroinitializer, <16 x i64> getelementptr ([65 x %struct.A], ptr @G, <16 x i64> zeroinitializer, <16 x i64> @test2() { vector.body: %VectorGep = getelementptr [65 x %struct.A], ptr @G, <16 x i32> zeroinitializer, <16 x i64> , <16 x i32> zeroinitializer diff --git a/llvm/test/Transforms/InstSimplify/ConstProp/vscale-inseltpoison.ll b/llvm/test/Transforms/InstSimplify/ConstProp/vscale-inseltpoison.ll index b388d37..d4d47da 100644 --- a/llvm/test/Transforms/InstSimplify/ConstProp/vscale-inseltpoison.ll +++ b/llvm/test/Transforms/InstSimplify/ConstProp/vscale-inseltpoison.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -instsimplify -S -verify | FileCheck %s +; RUN: opt < %s -passes=instsimplify,verify -S | FileCheck %s ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Unary Operations diff --git a/llvm/test/Transforms/InstSimplify/ConstProp/vscale.ll b/llvm/test/Transforms/InstSimplify/ConstProp/vscale.ll index 7ef6f8f..4c41867 100644 --- a/llvm/test/Transforms/InstSimplify/ConstProp/vscale.ll +++ b/llvm/test/Transforms/InstSimplify/ConstProp/vscale.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -instsimplify -S -verify | FileCheck %s +; RUN: opt < %s -passes=instsimplify,verify -S | FileCheck %s ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Unary Operations diff --git a/llvm/test/Transforms/InstSimplify/add_vp.ll b/llvm/test/Transforms/InstSimplify/add_vp.ll index f8e6a4c..327d45c 100644 --- a/llvm/test/Transforms/InstSimplify/add_vp.ll +++ b/llvm/test/Transforms/InstSimplify/add_vp.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -instsimplify -S | FileCheck %s +; RUN: opt < %s -passes=instsimplify -S | FileCheck %s declare <2 x i32> @llvm.vp.add.v2i32(<2 x i32>, <2 x i32>, <2 x i1>, i32) declare <2 x i32> @llvm.vp.sub.v2i32(<2 x i32>, <2 x i32>, <2 x i1>, i32) diff --git a/llvm/test/Transforms/InstSimplify/and-or-implied-cond.ll b/llvm/test/Transforms/InstSimplify/and-or-implied-cond.ll index 6123bf1..90b0abd 100644 --- a/llvm/test/Transforms/InstSimplify/and-or-implied-cond.ll +++ b/llvm/test/Transforms/InstSimplify/and-or-implied-cond.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -S -instsimplify < %s | FileCheck %s +; RUN: opt -S -passes=instsimplify < %s | FileCheck %s define i1 @or_implied(i8 %x, i1 %c) { ; CHECK-LABEL: @or_implied( diff --git a/llvm/test/Transforms/InstSimplify/constant-fold-fp-denormal.ll b/llvm/test/Transforms/InstSimplify/constant-fold-fp-denormal.ll index b973c9b..09159a1 100644 --- a/llvm/test/Transforms/InstSimplify/constant-fold-fp-denormal.ll +++ b/llvm/test/Transforms/InstSimplify/constant-fold-fp-denormal.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -S -instsimplify < %s | FileCheck %s +; RUN: opt -S -passes=instsimplify < %s | FileCheck %s ; Test cases for denormal handling mode when constant folding floating point ; operations. Input and output modes are checked seperately. diff --git a/llvm/test/Transforms/InstSimplify/named-vector-shuffle-reverse.ll b/llvm/test/Transforms/InstSimplify/named-vector-shuffle-reverse.ll index e1d5df5..a26f0a9 100644 --- a/llvm/test/Transforms/InstSimplify/named-vector-shuffle-reverse.ll +++ b/llvm/test/Transforms/InstSimplify/named-vector-shuffle-reverse.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -passes=instsimplify -S < %s | FileCheck %s +; RUN: opt -passes=instsimplify -S < %s | FileCheck %s ; Test back to back reverse shuffles are eliminated. define @shuffle_b2b_reverse( %a) { diff --git a/llvm/test/Transforms/InstSimplify/opaque-ptr.ll b/llvm/test/Transforms/InstSimplify/opaque-ptr.ll index af314a2..836e06e 100644 --- a/llvm/test/Transforms/InstSimplify/opaque-ptr.ll +++ b/llvm/test/Transforms/InstSimplify/opaque-ptr.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -S -instsimplify -opaque-pointers < %s | FileCheck %s +; RUN: opt -S -passes=instsimplify -opaque-pointers < %s | FileCheck %s define ptr @gep_zero_indices(ptr %p) { ; CHECK-LABEL: @gep_zero_indices( diff --git a/llvm/test/Transforms/InstSimplify/pr33957.ll b/llvm/test/Transforms/InstSimplify/pr33957.ll index e7663fc..f144132 100644 --- a/llvm/test/Transforms/InstSimplify/pr33957.ll +++ b/llvm/test/Transforms/InstSimplify/pr33957.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt -loop-unroll -S %s | FileCheck %s +; RUN: opt -passes=loop-unroll -S %s | FileCheck %s %struct.bar = type { i32 } diff --git a/llvm/test/Transforms/InstSimplify/simplify-nested-bitcast.ll b/llvm/test/Transforms/InstSimplify/simplify-nested-bitcast.ll index 565e306..cda3f38 100644 --- a/llvm/test/Transforms/InstSimplify/simplify-nested-bitcast.ll +++ b/llvm/test/Transforms/InstSimplify/simplify-nested-bitcast.ll @@ -1,4 +1,4 @@ -; RUN: opt -always-inline -S %s | FileCheck %s +; RUN: opt -passes=always-inline -S %s | FileCheck %s %0 = type { i64, i64, ptr addrspace(1), ptr addrspace(1) } %__aaa_struct = type { { ptr, i32, i32, ptr, ptr addrspace(1) }, %0, [17 x i8], { ptr, i32, i32, ptr, ptr addrspace(1) }, %0, [18 x i8] } %struct.__block_descriptor = type { i64, i64 } diff --git a/llvm/test/Transforms/InstSimplify/vscale-inseltpoison.ll b/llvm/test/Transforms/InstSimplify/vscale-inseltpoison.ll index 38e3964..00efca9 100644 --- a/llvm/test/Transforms/InstSimplify/vscale-inseltpoison.ll +++ b/llvm/test/Transforms/InstSimplify/vscale-inseltpoison.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -instsimplify -S -verify | FileCheck %s +; RUN: opt < %s -passes=instsimplify,verify -S | FileCheck %s ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Vector Operations diff --git a/llvm/test/Transforms/InstSimplify/vscale.ll b/llvm/test/Transforms/InstSimplify/vscale.ll index f86b3fa4..95848a7 100644 --- a/llvm/test/Transforms/InstSimplify/vscale.ll +++ b/llvm/test/Transforms/InstSimplify/vscale.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py -; RUN: opt < %s -instsimplify -S -verify | FileCheck %s +; RUN: opt < %s -passes=instsimplify,verify -S | FileCheck %s ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Vector Operations -- 2.7.4