From 4edb942c56a188e38c927deafd974bace0b54a5d Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 13 Dec 2013 16:59:06 -0800 Subject: various fixes for test_cases for fastcomp --- tests/cases/aliasbitcast.ll | 12 ++++++------ tests/cases/atomicrmw.ll | 8 ++++---- tests/cases/atomicrmw_unaligned.ll | 8 ++++---- tests/cases/breakinthemiddle.ll | 11 +++++++---- tests/cases/dash.ll | 8 ++++---- tests/cases/loadbitcastgep.ll | 7 ++++--- tests/cases/phientryimplicitmoar.ll | 14 +++++++------- tests/cases/selectstruct.ll | 4 +++- tests/cases/storebigfloat.ll | 2 ++ tests/cases/structphiparam.ll | 4 ++-- tests/cases/uadd_overflow_ta2.ll | 22 +++++++++++----------- tests/cases/zeroextarg.ll | 6 +++--- 12 files changed, 57 insertions(+), 49 deletions(-) (limited to 'tests/cases') diff --git a/tests/cases/aliasbitcast.ll b/tests/cases/aliasbitcast.ll index 70dc64ef..5e5f13aa 100644 --- a/tests/cases/aliasbitcast.ll +++ b/tests/cases/aliasbitcast.ll @@ -1,15 +1,15 @@ ; ModuleID = '/tmp/emscripten/tmp/src.cpp.o' -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-f80:32:32-n8:16:32" -target triple = "i386-pc-linux-gnu" +target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32" +target triple = "le32-unknown-nacl" @.str = private constant [14 x i8] c"hello, world!\00", align 1 ; [#uses=1] -@_ZN16FormWidgetChoiceD2Ev = alias bitcast (i32 678 to i8*) ; [#uses=1] +@_ZN16FormWidgetChoiceD2Ev = alias i8* inttoptr (i32 678 to i8*) ; [#uses=1] ; [#uses=2] -define void @"\01_Z5hellov"() { +define void @"_Z5hellov"() { entry: - %0 = call i32 bitcast (i32 (i8*)* @puts to i32 (i32*)*)(i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0)) ; [#uses=0] + %0 = call i32 @puts(i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0)) ; [#uses=0] br label %return return: ; preds = %entry @@ -25,7 +25,7 @@ entry: %retval = alloca i32 ; [#uses=2] %0 = alloca i32 ; [#uses=2] %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] - call void @"\01_Z5hellov"() + call void @"_Z5hellov"() store i32 0, i32* %0, align 4 %1 = load i32* %0, align 4 ; [#uses=1] store i32 %1, i32* %retval, align 4 diff --git a/tests/cases/atomicrmw.ll b/tests/cases/atomicrmw.ll index fe479dce..31529250 100644 --- a/tests/cases/atomicrmw.ll +++ b/tests/cases/atomicrmw.ll @@ -1,6 +1,6 @@ ; ModuleID = 'tests/hello_world.bc' -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-f80:32:32-n8:16:32-S128" -target triple = "i386-pc-linux-gnu" +target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32" +target triple = "le32-unknown-nacl" @.str = private unnamed_addr constant [15 x i8] c"hello, %d,%d!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*] @@ -10,10 +10,10 @@ entry: %t = alloca i32, align 4 ; [#uses=2 type=i32**] store i32 50, i32* %t, align 4 %0 = load i32* %t - %1 = atomicrmw add i32* %t, i32 3 seq_cst, ; [#uses=0 type=i32] [debug line = 21:12] + %1 = atomicrmw add i32* %t, i32 3 seq_cst ; [#uses=0 type=i32] [debug line = 21:12] %2 = load i32* %t %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0), i32 %0, i32 %2) ; [#uses=0 type=i32] - %3 = atomicrmw volatile add i32* %t, i32 3 seq_cst, ; [#uses=0 type=i32] [debug line = 21:12] + %3 = atomicrmw volatile add i32* %t, i32 3 seq_cst ; [#uses=0 type=i32] [debug line = 21:12] ret i32 1 } diff --git a/tests/cases/atomicrmw_unaligned.ll b/tests/cases/atomicrmw_unaligned.ll index fe479dce..31529250 100644 --- a/tests/cases/atomicrmw_unaligned.ll +++ b/tests/cases/atomicrmw_unaligned.ll @@ -1,6 +1,6 @@ ; ModuleID = 'tests/hello_world.bc' -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-f80:32:32-n8:16:32-S128" -target triple = "i386-pc-linux-gnu" +target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32" +target triple = "le32-unknown-nacl" @.str = private unnamed_addr constant [15 x i8] c"hello, %d,%d!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*] @@ -10,10 +10,10 @@ entry: %t = alloca i32, align 4 ; [#uses=2 type=i32**] store i32 50, i32* %t, align 4 %0 = load i32* %t - %1 = atomicrmw add i32* %t, i32 3 seq_cst, ; [#uses=0 type=i32] [debug line = 21:12] + %1 = atomicrmw add i32* %t, i32 3 seq_cst ; [#uses=0 type=i32] [debug line = 21:12] %2 = load i32* %t %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0), i32 %0, i32 %2) ; [#uses=0 type=i32] - %3 = atomicrmw volatile add i32* %t, i32 3 seq_cst, ; [#uses=0 type=i32] [debug line = 21:12] + %3 = atomicrmw volatile add i32* %t, i32 3 seq_cst ; [#uses=0 type=i32] [debug line = 21:12] ret i32 1 } diff --git a/tests/cases/breakinthemiddle.ll b/tests/cases/breakinthemiddle.ll index 769b0e11..6e05b853 100644 --- a/tests/cases/breakinthemiddle.ll +++ b/tests/cases/breakinthemiddle.ll @@ -1,8 +1,11 @@ +target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32" +target triple = "le32-unknown-nacl" + @.str = private constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1] -define linkonce_odr i32* @main() align 2 { - %199 = trunc i8 1 to i1 ; [#uses=1] - br i1 %199, label %label555, label %label569 +define linkonce_odr i32 @main() align 2 { + %1 = trunc i8 1 to i1 ; [#uses=1] + br i1 %1, label %label555, label %label569 label555: ; preds = %353 br label %label569 @@ -10,7 +13,7 @@ label555: ; preds = %353 br label %label569 label569: ; preds = %555 - %333 = call i32 @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0)) ; [#uses=0] + %3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0)) ; [#uses=0] ret i32 0 } diff --git a/tests/cases/dash.ll b/tests/cases/dash.ll index ed5b01ae..6833a42e 100644 --- a/tests/cases/dash.ll +++ b/tests/cases/dash.ll @@ -1,6 +1,6 @@ ; ModuleID = '/tmp/tmpqfApGD/a.out.bc' -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-f80:32:32-n8:16:32-S128" -target triple = "i386-pc-linux-gnu" +target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32" +target triple = "le32-unknown-nacl" @other-name = alias i32 ()* @main @@ -10,9 +10,9 @@ define i32 @main() { entry: %ret-val = alloca i32, align 4 store i32 0, i32* %ret-val - %aaa = bitcast i32 ()* @other-name to i32 + %aaa = ptrtoint i32 ()* @other-name to i32 %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.st-r, i32 0, i32 0), i32 %aaa) - ret i32 %ret-val + ret i32 0 } declare i32 @printf(i8*, ...) diff --git a/tests/cases/loadbitcastgep.ll b/tests/cases/loadbitcastgep.ll index 2a90dbb7..cfb88a0d 100644 --- a/tests/cases/loadbitcastgep.ll +++ b/tests/cases/loadbitcastgep.ll @@ -1,6 +1,6 @@ ; ModuleID = '/dev/shm/tmp/src.cpp.o' -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-f80:32:32-f128:128:128-n8:16:32" -target triple = "i386-pc-linux-gnu" +target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32" +target triple = "le32-unknown-nacl" %struct.CPU_Regs = type { [8 x %union.GenReg32] } %union.GenReg32 = type { [1 x i32] } @@ -15,7 +15,8 @@ entry: %0 = alloca i32 ; [#uses=2] %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] %1 = load i32* bitcast (i32* getelementptr inbounds (%struct.CPU_Regs* @cpu_regs, i32 0, i32 0, i32 1, i32 0, i32 0) to i32*), align 2 ; [#uses=1] - store i16 %1, i16* bitcast (%struct.CPU_Regs* @cpu_regs to i16*), align 2 + %b = trunc i32 %1 to i16 + store i16 %b, i16* bitcast (%struct.CPU_Regs* @cpu_regs to i16*), align 2 %2 = call i32 @puts(i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0)) ; [#uses=0] store i32 0, i32* %0, align 4 %3 = load i32* %0, align 4 ; [#uses=1] diff --git a/tests/cases/phientryimplicitmoar.ll b/tests/cases/phientryimplicitmoar.ll index c83458e6..0f07cc44 100644 --- a/tests/cases/phientryimplicitmoar.ll +++ b/tests/cases/phientryimplicitmoar.ll @@ -1,6 +1,6 @@ ; ModuleID = 'tests/hello_world.bc' -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-f80:32:32-n8:16:32-S128" -target triple = "i386-pc-linux-gnu" +target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32" +target triple = "le32-unknown-nacl" @.str = private unnamed_addr constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*] @.str2 = private unnamed_addr constant [15 x i8] c"hello!!world!\0A\00", align 1 ; [#uses=1 type=[15 x i8]*] @@ -9,16 +9,16 @@ define i32 @main() { %retval = alloca i32, align 4 %call2 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([15 x i8]* @.str2, i32 0, i32 0)) %a12 = zext i1 1 to i32 - br label %13 + br label %L13 -;