[test] Rewrite various tests to not use constprop

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D86653
This commit is contained in:
Arthur Eubanks 2020-08-26 12:47:59 -07:00
parent 9936455204
commit d1e6103a79
4 changed files with 6 additions and 5 deletions

View File

@ -1,4 +1,4 @@
; RUN: opt < %s -inline -constprop -S | FileCheck %s ; RUN: opt < %s -inline -S | FileCheck %s
define available_externally i32 @test_function() { define available_externally i32 @test_function() {
; CHECK-NOT: @test_function ; CHECK-NOT: @test_function
@ -16,7 +16,8 @@ entry:
%B = add i32 %A, 1 %B = add i32 %A, 1
ret i32 %B ret i32 %B
; CHECK: ret i32 5 ; CHECK: add i32
; CHECK-NEXT: ret i32
} }
; CHECK-NOT: @test_function ; CHECK-NOT: @test_function

View File

@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -reassociate -constprop -instcombine -dce -S | FileCheck %s ; RUN: opt < %s -reassociate -instcombine -dce -S | FileCheck %s
; With sub reassociation, constant folding can eliminate all of the constants. ; With sub reassociation, constant folding can eliminate all of the constants.
define i32 @test1(i32 %A, i32 %B) { define i32 @test1(i32 %A, i32 %B) {

View File

@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -reassociate -constprop -instcombine -S | FileCheck %s ; RUN: opt < %s -reassociate -instcombine -S | FileCheck %s
define float @test1(float %A, float %B) { define float @test1(float %A, float %B) {
; CHECK-LABEL: @test1( ; CHECK-LABEL: @test1(

View File

@ -1,6 +1,6 @@
; Reassociation should apply to Add, Mul, And, Or, & Xor ; Reassociation should apply to Add, Mul, And, Or, & Xor
; ;
; RUN: opt < %s -reassociate -constprop -instcombine -die -S | FileCheck %s ; RUN: opt < %s -reassociate -instcombine -die -S | FileCheck %s
define i32 @test_mul(i32 %arg) { define i32 @test_mul(i32 %arg) {
; CHECK-LABEL: test_mul ; CHECK-LABEL: test_mul