[llvm-commits] [llvm] r155081 - in /llvm/trunk/test/Transforms/PhaseOrdering: PR6627.ll basic.ll
Jakob Stoklund Olesen
stoklund at 2pi.dk
Wed Apr 18 17:20:38 PDT 2012
Author: stoklund
Date: Wed Apr 18 19:20:38 2012
New Revision: 155081
URL: http://llvm.org/viewvc/llvm-project?rev=155081&view=rev
Log:
Extract the broken part of XFAILed test into its own file.
Added:
llvm/trunk/test/Transforms/PhaseOrdering/PR6627.ll
- copied, changed from r155075, llvm/trunk/test/Transforms/PhaseOrdering/basic.ll
Modified:
llvm/trunk/test/Transforms/PhaseOrdering/basic.ll
Copied: llvm/trunk/test/Transforms/PhaseOrdering/PR6627.ll (from r155075, llvm/trunk/test/Transforms/PhaseOrdering/basic.ll)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/PhaseOrdering/PR6627.ll?p2=llvm/trunk/test/Transforms/PhaseOrdering/PR6627.ll&p1=llvm/trunk/test/Transforms/PhaseOrdering/basic.ll&r1=155075&r2=155081&rev=155081&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/PhaseOrdering/basic.ll (original)
+++ llvm/trunk/test/Transforms/PhaseOrdering/PR6627.ll Wed Apr 18 19:20:38 2012
@@ -1,29 +1,7 @@
; RUN: opt -O3 -S %s | FileCheck %s
; XFAIL: *
-target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
-target triple = "x86_64-apple-macosx10.6.7"
-
-declare i8* @malloc(i64)
-declare void @free(i8*)
-
-
-; PR2338
-define void @test1() nounwind ssp {
- %retval = alloca i32, align 4
- %i = alloca i8*, align 8
- %call = call i8* @malloc(i64 1)
- store i8* %call, i8** %i, align 8
- %tmp = load i8** %i, align 8
- store i8 1, i8* %tmp
- %tmp1 = load i8** %i, align 8
- call void @free(i8* %tmp1)
- ret void
-
-; CHECK: @test1
-; CHECK-NEXT: ret void
-}
-
+declare i32 @doo(...)
; PR6627 - This whole nasty sequence should be flattened down to a single
; 32-bit comparison.
@@ -70,8 +48,6 @@
; CHECK-NEXT: br i1 {{.*}}, label %if.then, label %if.end
}
-declare i32 @doo(...)
-
; PR6627 - This should all be flattened down to one compare. This is the same
; as test2, except that the initial load is done as an i8 instead of i32, thus
; requiring widening.
@@ -115,4 +91,3 @@
; CHECK-NEXT: icmp eq i32 %x1, 1179403647
; CHECK-NEXT: br i1 {{.*}}, label %if.then, label %if.end
}
-
Modified: llvm/trunk/test/Transforms/PhaseOrdering/basic.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/PhaseOrdering/basic.ll?rev=155081&r1=155080&r2=155081&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/PhaseOrdering/basic.ll (original)
+++ llvm/trunk/test/Transforms/PhaseOrdering/basic.ll Wed Apr 18 19:20:38 2012
@@ -1,5 +1,4 @@
; RUN: opt -O3 -S %s | FileCheck %s
-; XFAIL: *
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-apple-macosx10.6.7"
@@ -23,96 +22,3 @@
; CHECK: @test1
; CHECK-NEXT: ret void
}
-
-
-; PR6627 - This whole nasty sequence should be flattened down to a single
-; 32-bit comparison.
-define void @test2(i8* %arrayidx) nounwind ssp {
-entry:
- %xx = bitcast i8* %arrayidx to i32*
- %x1 = load i32* %xx, align 4
- %tmp = trunc i32 %x1 to i8
- %conv = zext i8 %tmp to i32
- %cmp = icmp eq i32 %conv, 127
- br i1 %cmp, label %land.lhs.true, label %if.end
-
-land.lhs.true: ; preds = %entry
- %arrayidx4 = getelementptr inbounds i8* %arrayidx, i64 1
- %tmp5 = load i8* %arrayidx4, align 1
- %conv6 = zext i8 %tmp5 to i32
- %cmp7 = icmp eq i32 %conv6, 69
- br i1 %cmp7, label %land.lhs.true9, label %if.end
-
-land.lhs.true9: ; preds = %land.lhs.true
- %arrayidx12 = getelementptr inbounds i8* %arrayidx, i64 2
- %tmp13 = load i8* %arrayidx12, align 1
- %conv14 = zext i8 %tmp13 to i32
- %cmp15 = icmp eq i32 %conv14, 76
- br i1 %cmp15, label %land.lhs.true17, label %if.end
-
-land.lhs.true17: ; preds = %land.lhs.true9
- %arrayidx20 = getelementptr inbounds i8* %arrayidx, i64 3
- %tmp21 = load i8* %arrayidx20, align 1
- %conv22 = zext i8 %tmp21 to i32
- %cmp23 = icmp eq i32 %conv22, 70
- br i1 %cmp23, label %if.then, label %if.end
-
-if.then: ; preds = %land.lhs.true17
- %call25 = call i32 (...)* @doo()
- br label %if.end
-
-if.end:
- ret void
-
-; CHECK: @test2
-; CHECK: %x1 = load i32* %xx, align 4
-; CHECK-NEXT: icmp eq i32 %x1, 1179403647
-; CHECK-NEXT: br i1 {{.*}}, label %if.then, label %if.end
-}
-
-declare i32 @doo(...)
-
-; PR6627 - This should all be flattened down to one compare. This is the same
-; as test2, except that the initial load is done as an i8 instead of i32, thus
-; requiring widening.
-define void @test2a(i8* %arrayidx) nounwind ssp {
-entry:
- %x1 = load i8* %arrayidx, align 4
- %conv = zext i8 %x1 to i32
- %cmp = icmp eq i32 %conv, 127
- br i1 %cmp, label %land.lhs.true, label %if.end
-
-land.lhs.true: ; preds = %entry
- %arrayidx4 = getelementptr inbounds i8* %arrayidx, i64 1
- %tmp5 = load i8* %arrayidx4, align 1
- %conv6 = zext i8 %tmp5 to i32
- %cmp7 = icmp eq i32 %conv6, 69
- br i1 %cmp7, label %land.lhs.true9, label %if.end
-
-land.lhs.true9: ; preds = %land.lhs.true
- %arrayidx12 = getelementptr inbounds i8* %arrayidx, i64 2
- %tmp13 = load i8* %arrayidx12, align 1
- %conv14 = zext i8 %tmp13 to i32
- %cmp15 = icmp eq i32 %conv14, 76
- br i1 %cmp15, label %land.lhs.true17, label %if.end
-
-land.lhs.true17: ; preds = %land.lhs.true9
- %arrayidx20 = getelementptr inbounds i8* %arrayidx, i64 3
- %tmp21 = load i8* %arrayidx20, align 1
- %conv22 = zext i8 %tmp21 to i32
- %cmp23 = icmp eq i32 %conv22, 70
- br i1 %cmp23, label %if.then, label %if.end
-
-if.then: ; preds = %land.lhs.true17
- %call25 = call i32 (...)* @doo()
- br label %if.end
-
-if.end:
- ret void
-
-; CHECK: @test2a
-; CHECK: %x1 = load i32* {{.*}}, align 4
-; CHECK-NEXT: icmp eq i32 %x1, 1179403647
-; CHECK-NEXT: br i1 {{.*}}, label %if.then, label %if.end
-}
-
More information about the llvm-commits
mailing list