mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-20 14:29:27 +00:00
Convert tests to FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189529 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
09174f8833
commit
9fd438fc00
@ -1,7 +1,8 @@
|
|||||||
; Instcombine was missing a test that caused it to make illegal transformations
|
; Instcombine was missing a test that caused it to make illegal transformations
|
||||||
; sometimes. In this case, it transforms the sub into an add:
|
; sometimes. In this case, it transforms the sub into an add:
|
||||||
; RUN: opt < %s -instcombine -S | grep sub
|
; RUN: opt < %s -instcombine -S | FileCheck %s
|
||||||
;
|
; CHECK: sub
|
||||||
|
|
||||||
define i32 @test(i32 %i, i32 %j) {
|
define i32 @test(i32 %i, i32 %j) {
|
||||||
%A = mul i32 %i, %j
|
%A = mul i32 %i, %j
|
||||||
%B = sub i32 2, %A
|
%B = sub i32 2, %A
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
; RUN: opt < %s -instcombine -S | not grep add
|
; RUN: opt < %s -instcombine -S | FileCheck %s
|
||||||
|
|
||||||
|
; CHECK-NOT: add
|
||||||
|
|
||||||
define i32 @test(i32 %A) {
|
define i32 @test(i32 %A) {
|
||||||
%A.neg = sub i32 0, %A ; <i32> [#uses=1]
|
%A.neg = sub i32 0, %A ; <i32> [#uses=1]
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
; This testcase can be simplified by "realizing" that alloca can never return
|
; This testcase can be simplified by "realizing" that alloca can never return
|
||||||
; null.
|
; null.
|
||||||
; RUN: opt < %s -instcombine -simplifycfg -S | not grep br
|
; RUN: opt < %s -instcombine -simplifycfg -S | FileCheck %s
|
||||||
|
; CHECK-NOT: br
|
||||||
|
|
||||||
declare i32 @bitmap_clear(...)
|
declare i32 @bitmap_clear(...)
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
; RUN: opt < %s -instcombine -S | \
|
; RUN: opt < %s -instcombine -S | FileCheck %s
|
||||||
; RUN: grep and
|
; CHECK: and
|
||||||
|
|
||||||
define i64 @foo(i64 %tmp, i64 %tmp2) {
|
define i64 @foo(i64 %tmp, i64 %tmp2) {
|
||||||
%tmp.upgrd.1 = trunc i64 %tmp to i32 ; <i32> [#uses=1]
|
%tmp.upgrd.1 = trunc i64 %tmp to i32 ; <i32> [#uses=1]
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
; RUN: opt < %s -instcombine -S | \
|
; RUN: opt < %s -instcombine -S | FileCheck %s
|
||||||
; RUN: grep mul | count 2
|
; CHECK: mul
|
||||||
|
; CHECK: mul
|
||||||
|
|
||||||
define <4 x float> @test(<4 x float> %V) {
|
define <4 x float> @test(<4 x float> %V) {
|
||||||
%Y = fmul <4 x float> %V, < float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00 > ; <<4 x float>> [#uses=1]
|
%Y = fmul <4 x float> %V, < float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00 > ; <<4 x float>> [#uses=1]
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
; RUN: opt < %s -instcombine -S | grep select
|
; RUN: opt < %s -instcombine -S | FileCheck %s
|
||||||
|
; CHECK: select
|
||||||
; END.
|
; END.
|
||||||
|
|
||||||
target datalayout = "e-p:32:32"
|
target datalayout = "e-p:32:32"
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
; RUN: opt < %s -instcombine -S | grep select
|
; RUN: opt < %s -instcombine -S | FileCheck %s
|
||||||
|
; CHECK: select
|
||||||
|
|
||||||
define double @fold(i1 %a, double %b) {
|
define double @fold(i1 %a, double %b) {
|
||||||
%s = select i1 %a, double 0., double 1.
|
%s = select i1 %a, double 0., double 1.
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
; RUN: opt < %s -instcombine -S | grep rem
|
; RUN: opt < %s -instcombine -S | FileCheck %s
|
||||||
; PR1933
|
; PR1933
|
||||||
|
|
||||||
|
; CHECK: rem
|
||||||
|
|
||||||
define i32 @fold(i32 %a) {
|
define i32 @fold(i32 %a) {
|
||||||
%s = mul i32 %a, 3
|
%s = mul i32 %a, 3
|
||||||
%c = urem i32 %s, 3
|
%c = urem i32 %s, 3
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
; RUN: opt < %s -instcombine -S | grep "xor"
|
; RUN: opt < %s -instcombine -S | FileCheck %s
|
||||||
; PR2389
|
; PR2389
|
||||||
|
|
||||||
|
; CHECK: xor
|
||||||
|
|
||||||
define i1 @test(i1 %a, i1 %b) {
|
define i1 @test(i1 %a, i1 %b) {
|
||||||
%A = add i1 %a, %b
|
%A = add i1 %a, %b
|
||||||
ret i1 %A
|
ret i1 %A
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
; This test makes sure that these instructions are properly eliminated.
|
; This test makes sure that these instructions are properly eliminated.
|
||||||
|
|
||||||
; RUN: opt < %s -instcombine -S | not grep select
|
; RUN: opt < %s -instcombine -S | FileCheck %s
|
||||||
|
; CHECK-NOT: select
|
||||||
|
|
||||||
|
|
||||||
define i41 @test1(i1 %C) {
|
define i41 @test1(i1 %C) {
|
||||||
@ -37,7 +38,7 @@ define i41 @test5(i41 %X) {
|
|||||||
|
|
||||||
define i1023 @test6(i1023 %X) {
|
define i1023 @test6(i1023 %X) {
|
||||||
;; ((X & 27) ? 27 : 0)
|
;; ((X & 27) ? 27 : 0)
|
||||||
%Y = and i1023 %X, 64
|
%Y = and i1023 %X, 64
|
||||||
%t = icmp ne i1023 %Y, 0
|
%t = icmp ne i1023 %Y, 0
|
||||||
%V = select i1 %t, i1023 64, i1023 0
|
%V = select i1 %t, i1023 64, i1023 0
|
||||||
ret i1023 %V
|
ret i1023 %V
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
; RUN: opt < %s -instcombine -S | not grep select
|
; RUN: opt < %s -instcombine -S | FileCheck %s
|
||||||
|
|
||||||
|
; CHECK-NOT: select
|
||||||
|
|
||||||
define void @foo(<4 x i32> *%A, <4 x i32> *%B, <4 x i32> *%C, <4 x i32> *%D,
|
define void @foo(<4 x i32> *%A, <4 x i32> *%B, <4 x i32> *%C, <4 x i32> *%D,
|
||||||
<4 x i32> *%E, <4 x i32> *%F, <4 x i32> *%G, <4 x i32> *%H,
|
<4 x i32> *%E, <4 x i32> *%F, <4 x i32> *%G, <4 x i32> *%H,
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
; RUN: opt < %s -instcombine -S | grep select | count 2
|
; RUN: opt < %s -instcombine -S | FileCheck %s
|
||||||
|
|
||||||
|
; CHECK: select
|
||||||
|
; CHECK: select
|
||||||
|
|
||||||
; Make sure instcombine don't fold select into operands. We don't want to emit
|
; Make sure instcombine don't fold select into operands. We don't want to emit
|
||||||
; select of two integers unless it's selecting 0 / 1.
|
; select of two integers unless it's selecting 0 / 1.
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
; RUN: opt < %s -instcombine -S | not grep extractelement
|
; RUN: opt < %s -instcombine -S | FileCheck %s
|
||||||
|
; CHECK-NOT: extractelement
|
||||||
|
|
||||||
define i32 @test(float %f) {
|
define i32 @test(float %f) {
|
||||||
%tmp7 = insertelement <4 x float> undef, float %f, i32 0 ; <<4 x float>> [#uses=1]
|
%tmp7 = insertelement <4 x float> undef, float %f, i32 0 ; <<4 x float>> [#uses=1]
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
; RUN: opt < %s -instcombine -S | grep "ret <4 x i32> %A"
|
; RUN: opt < %s -instcombine -S | FileCheck %s
|
||||||
|
; CHECK: ret <4 x i32> %A
|
||||||
|
|
||||||
; PR1286
|
; PR1286
|
||||||
define <4 x i32> @test1(<4 x i32> %A) {
|
define <4 x i32> @test1(<4 x i32> %A) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user