mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +00:00
Use opt -S instead of piping bitcode output through llvm-dis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81257 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -reassociate -instcombine -constprop -dce | llvm-dis | not grep add
|
||||
; RUN: opt %s -reassociate -instcombine -constprop -dce -S | not grep add
|
||||
|
||||
define i32 @test(i32 %A) {
|
||||
%X = add i32 %A, 1 ; <i32> [#uses=1]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -reassociate -instcombine -constprop -die | llvm-dis | not grep 5
|
||||
; RUN: opt < %s -reassociate -instcombine -constprop -die -S | not grep 5
|
||||
|
||||
define i32 @test(i32 %A, i32 %B) {
|
||||
%W = add i32 %B, -5 ; <i32> [#uses=1]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
; With sub reassociation, constant folding can eliminate all of the constants.
|
||||
;
|
||||
; RUN: opt %s -reassociate -constprop -instcombine -dce | llvm-dis | not grep add
|
||||
; RUN: opt %s -reassociate -constprop -instcombine -dce -S | not grep add
|
||||
|
||||
define i32 @test(i32 %A, i32 %B) {
|
||||
%W = add i32 5, %B ; <i32> [#uses=1]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
; With sub reassociation, constant folding can eliminate the two 12 constants.
|
||||
;
|
||||
; RUN: opt %s -reassociate -constprop -dce | llvm-dis | not grep 12
|
||||
; RUN: opt %s -reassociate -constprop -dce -S | not grep 12
|
||||
|
||||
define i32 @test(i32 %A, i32 %B, i32 %C, i32 %D) {
|
||||
%M = add i32 %A, 12 ; <i32> [#uses=1]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -reassociate -instcombine | llvm-dis |\
|
||||
; RUN: opt %s -reassociate -instcombine -S |\
|
||||
; RUN: grep {ret i32 0}
|
||||
|
||||
define i32 @f(i32 %a0, i32 %a1, i32 %a2, i32 %a3, i32 %a4) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
; With reassociation, constant folding can eliminate the 12 and -12 constants.
|
||||
;
|
||||
; RUN: opt %s -reassociate -constprop -instcombine -die | llvm-dis | not grep add
|
||||
; RUN: opt %s -reassociate -constprop -instcombine -die -S | not grep add
|
||||
|
||||
define i32 @test(i32 %arg) {
|
||||
%tmp1 = sub i32 -12, %arg ; <i32> [#uses=1]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
; With reassociation, constant folding can eliminate the +/- 30 constants.
|
||||
;
|
||||
; RUN: opt %s -reassociate -constprop -instcombine -die | llvm-dis | not grep 30
|
||||
; RUN: opt %s -reassociate -constprop -instcombine -die -S | not grep 30
|
||||
|
||||
define i32 @test(i32 %reg109, i32 %reg1111) {
|
||||
%reg115 = add i32 %reg109, -30 ; <i32> [#uses=1]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -reassociate -gvn | llvm-dis | grep add | count 6
|
||||
; RUN: opt %s -reassociate -gvn -S | grep add | count 6
|
||||
; Each of these functions should turn into two adds each.
|
||||
|
||||
@e = external global i32 ; <i32*> [#uses=3]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -reassociate -gvn -instcombine | llvm-dis | not grep add
|
||||
; RUN: opt %s -reassociate -gvn -instcombine -S | not grep add
|
||||
|
||||
@a = weak global i32 0 ; <i32*> [#uses=1]
|
||||
@b = weak global i32 0 ; <i32*> [#uses=1]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -reassociate -dce | llvm-dis | \
|
||||
; RUN: opt %s -reassociate -dce -S | \
|
||||
; RUN: not grep {\\(and\\|sub\\)}
|
||||
|
||||
define i32 @test1(i32 %a, i32 %b) {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
; In this case, we want to reassociate the specified expr so that i+j can be
|
||||
; hoisted out of the inner most loop.
|
||||
;
|
||||
; RUN: opt %s -reassociate | llvm-dis | grep 115 | not grep 117
|
||||
; RUN: opt %s -reassociate -S | grep 115 | not grep 117
|
||||
; END.
|
||||
@.LC0 = internal global [4 x i8] c"%d\0A\00" ; <[4 x i8]*> [#uses=1]
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; This should be one add and two multiplies.
|
||||
|
||||
; RUN: llvm-as < %s | \
|
||||
; RUN: opt -reassociate -instcombine | llvm-dis > %t
|
||||
; RUN: opt -reassociate -instcombine -S > %t
|
||||
; RUN: grep mul %t | count 2
|
||||
; RUN: grep add %t | count 1
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -reassociate -instcombine | llvm-dis |\
|
||||
; RUN: opt %s -reassociate -instcombine -S |\
|
||||
; RUN: not grep {sub i32 0}
|
||||
|
||||
define i32 @test(i32 %X, i32 %Y, i32 %Z) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -reassociate -instcombine | llvm-dis | grep mul | count 2
|
||||
; RUN: opt < %s -reassociate -instcombine -S | grep mul | count 2
|
||||
|
||||
; This should have exactly 2 multiplies when we're done.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; This should turn into one multiply and one add.
|
||||
|
||||
; RUN: llvm-as < %s | \
|
||||
; RUN: opt -instcombine -reassociate -instcombine | llvm-dis > %t
|
||||
; RUN: opt -instcombine -reassociate -instcombine -S > %t
|
||||
; RUN: grep mul %t | count 1
|
||||
; RUN: grep add %t | count 1
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -reassociate -instcombine | llvm-dis | not grep sub
|
||||
; RUN: opt %s -reassociate -instcombine -S | not grep sub
|
||||
|
||||
; Test that we can turn things like X*-(Y*Z) -> X*-1*Y*Z.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
; Reassociation should apply to Add, Mul, And, Or, & Xor
|
||||
;
|
||||
; RUN: opt %s -reassociate -constprop -instcombine -die | llvm-dis | not grep 12
|
||||
; RUN: opt %s -reassociate -constprop -instcombine -die -S | not grep 12
|
||||
|
||||
define i32 @test_mul(i32 %arg) {
|
||||
%tmp1 = mul i32 12, %arg ; <i32> [#uses=1]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
; There should be exactly one shift and one add left.
|
||||
; RUN: llvm-as < %s | \
|
||||
; RUN: opt -reassociate -instcombine | llvm-dis > %t
|
||||
; RUN: opt -reassociate -instcombine -S > %t
|
||||
; RUN: grep shl %t | count 1
|
||||
; RUN: grep add %t | count 1
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
; With shl->mul reassociation, we can see that this is (shl A, 9) * A
|
||||
;
|
||||
; RUN: opt %s -reassociate -instcombine | llvm-dis |\
|
||||
; RUN: opt %s -reassociate -instcombine -S |\
|
||||
; RUN: grep {shl .*, 9}
|
||||
|
||||
define i32 @test(i32 %A, i32 %B) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
; With sub reassociation, constant folding can eliminate the 12 and -12 constants.
|
||||
;
|
||||
; RUN: opt %s -reassociate -instcombine | llvm-dis | not grep 12
|
||||
; RUN: opt %s -reassociate -instcombine -S | not grep 12
|
||||
|
||||
define i32 @test(i32 %A, i32 %B) {
|
||||
%X = add i32 -12, %A ; <i32> [#uses=1]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
; With sub reassociation, constant folding can eliminate the uses of %a.
|
||||
;
|
||||
; RUN: opt %s -reassociate -instcombine | llvm-dis | grep %a | count 1
|
||||
; RUN: opt %s -reassociate -instcombine -S | grep %a | count 1
|
||||
; PR2047
|
||||
|
||||
define i32 @test(i32 %a, i32 %b, i32 %c) nounwind {
|
||||
|
||||
Reference in New Issue
Block a user