[NFC] Port all InstSimplify tests to `-passes=` syntax
authorRoman Lebedev <lebedev.ri@gmail.com>
Wed, 7 Dec 2022 23:27:24 +0000 (02:27 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Wed, 7 Dec 2022 23:38:45 +0000 (02:38 +0300)
24 files changed:
llvm/test/Transforms/InstSimplify/2011-10-27-BinOpCrash.ll
llvm/test/Transforms/InstSimplify/ConstProp/2002-09-03-SetCC-Bools.ll
llvm/test/Transforms/InstSimplify/ConstProp/2006-12-01-TruncBoolBug.ll
llvm/test/Transforms/InstSimplify/ConstProp/basictest.ll
llvm/test/Transforms/InstSimplify/ConstProp/div-zero.ll
llvm/test/Transforms/InstSimplify/ConstProp/gep-alias.ll
llvm/test/Transforms/InstSimplify/ConstProp/gep-constanfolding-error.ll
llvm/test/Transforms/InstSimplify/ConstProp/gep.ll
llvm/test/Transforms/InstSimplify/ConstProp/icmp-global.ll
llvm/test/Transforms/InstSimplify/ConstProp/logicaltest.ll
llvm/test/Transforms/InstSimplify/ConstProp/phi.ll
llvm/test/Transforms/InstSimplify/ConstProp/remtest.ll
llvm/test/Transforms/InstSimplify/ConstProp/vectorgep-crash.ll
llvm/test/Transforms/InstSimplify/ConstProp/vscale-inseltpoison.ll
llvm/test/Transforms/InstSimplify/ConstProp/vscale.ll
llvm/test/Transforms/InstSimplify/add_vp.ll
llvm/test/Transforms/InstSimplify/and-or-implied-cond.ll
llvm/test/Transforms/InstSimplify/constant-fold-fp-denormal.ll
llvm/test/Transforms/InstSimplify/named-vector-shuffle-reverse.ll
llvm/test/Transforms/InstSimplify/opaque-ptr.ll
llvm/test/Transforms/InstSimplify/pr33957.ll
llvm/test/Transforms/InstSimplify/simplify-nested-bitcast.ll
llvm/test/Transforms/InstSimplify/vscale-inseltpoison.ll
llvm/test/Transforms/InstSimplify/vscale.ll

index 549e994..fcb98bb 100644 (file)
@@ -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
index 81a64f9..3bdca60 100644 (file)
@@ -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() {
index ce66c70..c26498d 100644 (file)
@@ -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                ; <i1> [#uses=1]
index 5c8f747..7529008 100644 (file)
@@ -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
 }
-  
+
index 22b4d8e..842b45b 100644 (file)
@@ -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()
 
index b987f8b..bf09691 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -instcombine -S -o - %s | FileCheck %s\r
+; RUN: opt -passes=instcombine -S -o - %s | FileCheck %s\r
 ; Test that we don't replace an alias with its aliasee when simplifying GEPs.\r
 ; In this test case the transformation is invalid because it replaces the\r
 ; reference to the symbol "b" (which refers to whichever instance of "b"\r
index ba0eb4b..474af2d 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt -gvn -S -o - %s | FileCheck %s\r
+; RUN: opt -passes=gvn -S -o - %s | FileCheck %s\r
 ; RUN: opt -passes=newgvn -S -o - %s | FileCheck %s\r
 ; Test that the constantfolding getelementptr computation results in\r
 ; j[5][4][1] (j+239)\r
index 54069c9..6dd34a4 100644 (file)
@@ -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"
index f55a18c..701d911 100644 (file)
@@ -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(
index 5fbf521..28335a1 100644 (file)
@@ -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() {
index c6d2f5a..eb08d65 100644 (file)
@@ -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:
index 39de313..5cd1071 100644 (file)
@@ -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              ; <i32> [#uses=1]
index 2b6e461..5f55450 100644 (file)
@@ -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> <i64 1, i64 2, i64 3, i64 4, i64 5, i64 6, i64 7, i64 8, i64 9, 
+; CHECK: ret <16 x ptr> getelementptr ([65 x %struct.A], ptr @G, <16 x i64> zeroinitializer, <16 x i64> <i64 1, i64 2, i64 3, i64 4, i64 5, i64 6, i64 7, i64 8, i64 9,
 define <16 x ptr> @test2() {
 vector.body:
   %VectorGep = getelementptr [65 x %struct.A], ptr @G, <16 x i32> zeroinitializer, <16 x i64> <i64 1, i64 2, i64 3, i64 4, i64 5, i64 6, i64 7, i64 8, i64 9, i64 10, i64 11, i64 12, i64 13, i64 14, i64 15, i64 16>, <16 x i32> zeroinitializer
index b388d37..d4d47da 100644 (file)
@@ -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
index 7ef6f8f..4c41867 100644 (file)
@@ -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
index f8e6a4c..327d45c 100644 (file)
@@ -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)
index 6123bf1..90b0abd 100644 (file)
@@ -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(
index b973c9b..09159a1 100644 (file)
@@ -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.
index e1d5df5..a26f0a9 100644 (file)
@@ -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 <vscale x 4 x i32> @shuffle_b2b_reverse(<vscale x 4 x i32> %a) {
index af314a2..836e06e 100644 (file)
@@ -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(
index e7663fc..f144132 100644 (file)
@@ -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 }
 
index 565e306..cda3f38 100644 (file)
@@ -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 }
index 38e3964..00efca9 100644 (file)
@@ -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
index f86b3fa..95848a7 100644 (file)
@@ -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