mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-23 22:23:00 +00:00
manually upgrade a bunch of tests to modern syntax, and remove some that
are either unreduced or only test old syntax. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133228 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -4,7 +4,7 @@ target triple = "powerpc-apple-darwin8.8.0"
|
||||
; RUN: llc < %s -march=ppc32 | grep {rlwinm r3, r3, 23, 30, 30}
|
||||
; PR1473
|
||||
|
||||
define i8 @foo(i16 zeroext %a) zeroext {
|
||||
define zeroext i8 @foo(i16 zeroext %a) {
|
||||
%tmp2 = lshr i16 %a, 10 ; <i16> [#uses=1]
|
||||
%tmp23 = trunc i16 %tmp2 to i8 ; <i8> [#uses=1]
|
||||
%tmp4 = shl i8 %tmp23, 1 ; <i8> [#uses=1]
|
||||
|
||||
@@ -18,7 +18,7 @@ define void @"-[PFTPersistentSymbols saveSymbolWithName:address:path:lineNumber:
|
||||
entry:
|
||||
br i1 false, label %bb12, label %bb21
|
||||
bb12: ; preds = %entry
|
||||
%tmp17 = tail call i8 inttoptr (i64 4294901504 to i8 (%struct..0objc_object*, %struct.objc_selector*, %struct.NSArray*)*)( %struct..0objc_object* null, %struct.objc_selector* null, %struct.NSArray* bitcast (%struct.__builtin_CFString* @0 to %struct.NSArray*) ) signext nounwind ; <i8> [#uses=0]
|
||||
%tmp17 = tail call signext i8 inttoptr (i64 4294901504 to i8 (%struct..0objc_object*, %struct.objc_selector*, %struct.NSArray*)*)( %struct..0objc_object* null, %struct.objc_selector* null, %struct.NSArray* bitcast (%struct.__builtin_CFString* @0 to %struct.NSArray*) ) nounwind ; <i8> [#uses=0]
|
||||
br i1 false, label %bb25, label %bb21
|
||||
bb21: ; preds = %bb12, %entry
|
||||
%tmp24 = or i64 %flags, 4 ; <i64> [#uses=1]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128"
|
||||
target triple = "powerpc-apple-darwin9"
|
||||
|
||||
define i16 @t(i16* %dct) signext nounwind {
|
||||
define signext i16 @t(i16* %dct) nounwind {
|
||||
entry:
|
||||
load i16* null, align 2 ; <i16>:0 [#uses=2]
|
||||
lshr i16 %0, 11 ; <i16>:1 [#uses=0]
|
||||
|
||||
@@ -9,7 +9,7 @@ define void @test(i8* %P) {
|
||||
ret void
|
||||
}
|
||||
|
||||
define i16 @test2(i16 zeroext %crc) zeroext {
|
||||
define zeroext i16 @test2(i16 zeroext %crc) {
|
||||
; No and's should be needed for the i16s here.
|
||||
%tmp.1 = lshr i16 %crc, 1
|
||||
%tmp.7 = xor i16 %tmp.1, 40961
|
||||
|
||||
@@ -9,7 +9,7 @@ define i32 @test1(i32 %mode.0.i.0) {
|
||||
ret i32 %tmp.81
|
||||
}
|
||||
|
||||
define i16 @test2(i16 signext %X, i16 signext %x) signext {
|
||||
define signext i16 @test2(i16 signext %X, i16 signext %x) {
|
||||
%tmp = sext i16 %X to i32
|
||||
%tmp1 = sext i16 %x to i32
|
||||
%tmp2 = add i32 %tmp, %tmp1
|
||||
@@ -20,7 +20,7 @@ define i16 @test2(i16 signext %X, i16 signext %x) signext {
|
||||
ret i16 %retval
|
||||
}
|
||||
|
||||
define i16 @test3(i32 zeroext %X) signext {
|
||||
define signext i16 @test3(i32 zeroext %X) {
|
||||
%tmp1 = lshr i32 %X, 16
|
||||
%tmp2 = trunc i32 %tmp1 to i16
|
||||
ret i16 %tmp2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; Test various forms of calls.
|
||||
|
||||
; RUN: llc < %s -march=ppc32 | \
|
||||
; RUN: grep {bl } | count 2
|
||||
; RUN: grep {bl } | count 1
|
||||
; RUN: llc < %s -march=ppc32 | \
|
||||
; RUN: grep {bctrl} | count 1
|
||||
; RUN: llc < %s -march=ppc32 | \
|
||||
@@ -14,11 +14,6 @@ define void @test_direct() {
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @test_extsym(i8* %P) {
|
||||
free i8* %P
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @test_indirect(void ()* %fp) {
|
||||
call void %fp( )
|
||||
ret void
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
; RUN: llc < %s -march=ppc32
|
||||
|
||||
declare {i32, i1} @llvm.umul.with.overflow.i32(i32 %a, i32 %b)
|
||||
define i1 @a(i32 %x) zeroext nounwind {
|
||||
define zeroext i1 @a(i32 %x) nounwind {
|
||||
%res = call {i32, i1} @llvm.umul.with.overflow.i32(i32 %x, i32 3)
|
||||
%obil = extractvalue {i32, i1} %res, 1
|
||||
ret i1 %obil
|
||||
}
|
||||
|
||||
declare {i32, i1} @llvm.smul.with.overflow.i32(i32 %a, i32 %b)
|
||||
define i1 @b(i32 %x) zeroext nounwind {
|
||||
define zeroext i1 @b(i32 %x) nounwind {
|
||||
%res = call {i32, i1} @llvm.smul.with.overflow.i32(i32 %x, i32 3)
|
||||
%obil = extractvalue {i32, i1} %res, 1
|
||||
ret i1 %obil
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
; RUN: llc < %s -march=ppc32 | not grep {extsh\\|rlwinm}
|
||||
|
||||
declare i16 @foo() signext
|
||||
declare signext i16 @foo()
|
||||
|
||||
define i32 @test1(i16 signext %X) {
|
||||
%Y = sext i16 %X to i32 ;; dead
|
||||
@@ -14,12 +14,12 @@ define i32 @test2(i16 zeroext %X) {
|
||||
}
|
||||
|
||||
define void @test3() {
|
||||
%tmp.0 = call i16 @foo() signext ;; no extsh!
|
||||
%tmp.0 = call signext i16 @foo() ;; no extsh!
|
||||
%tmp.1 = icmp slt i16 %tmp.0, 1234
|
||||
br i1 %tmp.1, label %then, label %UnifiedReturnBlock
|
||||
|
||||
then:
|
||||
call i32 @test1(i16 0 signext)
|
||||
call i32 @test1(i16 signext 0)
|
||||
ret void
|
||||
UnifiedReturnBlock:
|
||||
ret void
|
||||
@@ -46,7 +46,7 @@ define i32 @test6(i32* %P) {
|
||||
ret i32 %tmp.2
|
||||
}
|
||||
|
||||
define i16 @test7(float %a) zeroext {
|
||||
define zeroext i16 @test7(float %a) {
|
||||
%tmp.1 = fptoui float %a to i16
|
||||
ret i16 %tmp.1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user