aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-02-21 13:51:43 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-02-21 13:51:43 +0000
commit3f4bde29a30d8c43db5cbe8f5541ebc5d1fdc6af (patch)
tree87140683fc3fee4e14b3c37e2aa7a4031d473f49 /test
parenta322a4af1fe8b989fe5d1bbc15de8736a26c03ca (diff)
downloadsrc-3f4bde29a30d8c43db5cbe8f5541ebc5d1fdc6af.tar.gz
src-3f4bde29a30d8c43db5cbe8f5541ebc5d1fdc6af.zip
Vendor import of llvm release_38 branch r261369:vendor/llvm/llvm-release_38-r261369
Notes
Notes: svn path=/vendor/llvm/dist/; revision=295846 svn path=/vendor/llvm/llvm-release_38-r261369/; revision=295847; tag=vendor/llvm/llvm-release_38-r261369
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/AArch64/fcopysign.ll23
-rw-r--r--test/CodeGen/WinEH/wineh-noret-cleanup.ll80
-rw-r--r--test/CodeGen/X86/pr26625.ll20
-rw-r--r--test/CodeGen/X86/regalloc-spill-at-ehpad.ll75
-rw-r--r--test/CodeGen/X86/shrink-wrap-chkstk.ll35
-rw-r--r--test/MC/Sparc/sparc-ctrl-instructions.s13
-rw-r--r--test/MC/Sparc/sparc64-ctrl-instructions.s12
-rw-r--r--test/MC/X86/x86_nop.s8
-rw-r--r--test/Transforms/InstCombine/fprintf-1.ll9
-rw-r--r--test/Transforms/LoopStrengthReduce/funclet.ll29
-rw-r--r--test/Transforms/LoopVectorize/PowerPC/stride-vectorization.ll8
-rw-r--r--test/Transforms/LoopVectorize/X86/reg-usage.ll71
-rw-r--r--test/Transforms/LoopVectorize/X86/vector_max_bandwidth.ll2
-rw-r--r--test/Transforms/LoopVectorize/interleaved-accesses.ll6
-rw-r--r--test/Transforms/PruneEH/pr26263.ll56
15 files changed, 369 insertions, 78 deletions
diff --git a/test/CodeGen/AArch64/fcopysign.ll b/test/CodeGen/AArch64/fcopysign.ll
new file mode 100644
index 000000000000..6bda33cf76ef
--- /dev/null
+++ b/test/CodeGen/AArch64/fcopysign.ll
@@ -0,0 +1,23 @@
+; RUN: llc -o - %s | FileCheck %s
+; Check that selection dag legalization of fcopysign works in cases with
+; different modes for the arguments.
+target triple = "aarch64--"
+
+declare fp128 @llvm.copysign.f128(fp128, fp128)
+
+@val = global double zeroinitializer, align 8
+
+; CHECK-LABEL: copysign0
+; CHECK: ldr [[REG:x[0-9]+]], [x8, :lo12:val]
+; CHECK: and [[ANDREG:x[0-9]+]], [[REG]], #0x8000000000000000
+; CHECK: lsr x[[LSRREGNUM:[0-9]+]], [[ANDREG]], #56
+; CHECK: bfxil w[[LSRREGNUM]], w{{[0-9]+}}, #0, #7
+; CHECK: strb w[[LSRREGNUM]],
+; CHECK: ldr q{{[0-9]+}},
+define fp128 @copysign0() {
+entry:
+ %v = load double, double* @val, align 8
+ %conv = fpext double %v to fp128
+ %call = tail call fp128 @llvm.copysign.f128(fp128 0xL00000000000000007FFF000000000000, fp128 %conv) #2
+ ret fp128 %call
+}
diff --git a/test/CodeGen/WinEH/wineh-noret-cleanup.ll b/test/CodeGen/WinEH/wineh-noret-cleanup.ll
new file mode 100644
index 000000000000..7d4d833aa9ba
--- /dev/null
+++ b/test/CodeGen/WinEH/wineh-noret-cleanup.ll
@@ -0,0 +1,80 @@
+; RUN: sed -e s/.Cxx:// %s | llc -mtriple=x86_64-pc-windows-msvc | FileCheck %s --check-prefix=CXX
+; RUN: sed -e s/.Seh:// %s | llc -mtriple=x86_64-pc-windows-msvc | FileCheck %s --check-prefix=SEH
+
+declare i32 @__CxxFrameHandler3(...)
+declare i32 @__C_specific_handler(...)
+declare void @dummy_filter()
+
+declare void @f(i32)
+
+;Cxx: define void @test() personality i32 (...)* @__CxxFrameHandler3 {
+;Seh: define void @test() personality i32 (...)* @__C_specific_handler {
+entry:
+ invoke void @f(i32 1)
+ to label %invoke.cont unwind label %catch.dispatch
+
+catch.dispatch:
+ %cs1 = catchswitch within none [label %catch.body] unwind label %catch.dispatch.2
+
+catch.body:
+;Cxx: %catch = catchpad within %cs1 [i8* null, i32 u0x40, i8* null]
+;Seh: %catch = catchpad within %cs1 [void ()* @dummy_filter]
+ invoke void @f(i32 2) [ "funclet"(token %catch) ]
+ to label %unreachable unwind label %terminate
+
+terminate:
+ %cleanup = cleanuppad within %catch []
+ call void @f(i32 3) [ "funclet"(token %cleanup) ]
+ unreachable
+
+unreachable:
+ unreachable
+
+invoke.cont:
+ ret void
+
+catch.dispatch.2:
+ %cs2 = catchswitch within none [label %catch.body.2] unwind to caller
+
+catch.body.2:
+;Cxx: %catch2 = catchpad within %cs2 [i8* null, i32 u0x40, i8* null]
+;Seh: %catch2 = catchpad within %cs2 [void ()* @dummy_filter]
+ unreachable
+}
+
+; CXX-LABEL: test:
+; CXX-LABEL: $ip2state$test:
+; CXX-NEXT: .long .Lfunc_begin0@IMGREL
+; CXX-NEXT: .long -1
+; CXX-NEXT: .long .Ltmp0@IMGREL+1
+; CXX-NEXT: .long 1
+; CXX-NEXT: .long .Ltmp1@IMGREL+1
+; CXX-NEXT: .long -1
+; CXX-NEXT: .long "?catch$3@?0?test@4HA"@IMGREL
+; CXX-NEXT: .long 2
+; CXX-NEXT: .long .Ltmp2@IMGREL+1
+; CXX-NEXT: .long 3
+; CXX-NEXT: .long .Ltmp3@IMGREL+1
+; CXX-NEXT: .long 2
+; CXX-NEXT: .long "?catch$5@?0?test@4HA"@IMGREL
+; CXX-NEXT: .long 4
+
+; SEH-LABEL: test:
+; SEH-LABEL: .Llsda_begin0:
+; SEH-NEXT: .long .Ltmp0@IMGREL+1
+; SEH-NEXT: .long .Ltmp1@IMGREL+1
+; SEH-NEXT: .long dummy_filter@IMGREL
+; SEH-NEXT: .long .LBB0_3@IMGREL
+; SEH-NEXT: .long .Ltmp0@IMGREL+1
+; SEH-NEXT: .long .Ltmp1@IMGREL+1
+; SEH-NEXT: .long dummy_filter@IMGREL
+; SEH-NEXT: .long .LBB0_5@IMGREL
+; SEH-NEXT: .long .Ltmp2@IMGREL+1
+; SEH-NEXT: .long .Ltmp3@IMGREL+1
+; SEH-NEXT: .long "?dtor$2@?0?test@4HA"@IMGREL
+; SEH-NEXT: .long 0
+; SEH-NEXT: .long .Ltmp2@IMGREL+1
+; SEH-NEXT: .long .Ltmp3@IMGREL+1
+; SEH-NEXT: .long dummy_filter@IMGREL
+; SEH-NEXT: .long .LBB0_5@IMGREL
+; SEH-NEXT: .Llsda_end0:
diff --git a/test/CodeGen/X86/pr26625.ll b/test/CodeGen/X86/pr26625.ll
new file mode 100644
index 000000000000..1b2e227bb59a
--- /dev/null
+++ b/test/CodeGen/X86/pr26625.ll
@@ -0,0 +1,20 @@
+; RUN: llc < %s -mcpu=i686 2>&1 | FileCheck %s
+; PR26625
+
+target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
+target triple = "i386"
+
+define float @x0(float %f) #0 {
+entry:
+ %call = tail call float @sqrtf(float %f) #1
+ ret float %call
+; CHECK-LABEL: x0:
+; CHECK: flds
+; CHECK-NEXT: fsqrt
+; CHECK-NOT: vsqrtss
+}
+
+declare float @sqrtf(float) #0
+
+attributes #0 = { nounwind optsize readnone }
+attributes #1 = { nounwind optsize readnone }
diff --git a/test/CodeGen/X86/regalloc-spill-at-ehpad.ll b/test/CodeGen/X86/regalloc-spill-at-ehpad.ll
new file mode 100644
index 000000000000..32cc9e781fb6
--- /dev/null
+++ b/test/CodeGen/X86/regalloc-spill-at-ehpad.ll
@@ -0,0 +1,75 @@
+; RUN: llc -regalloc=greedy -mtriple=x86_64-pc-windows-msvc < %s -o - | FileCheck %s
+
+; This test checks for proper handling of a condition where the greedy register
+; allocator encounters a very short interval that contains no uses but does
+; contain an EH pad unwind edge, which requires spilling. Previously the
+; register allocator marked a interval like this as unspillable, resulting in
+; a compilation failure.
+
+
+; The following checks that the value %p is reloaded within the catch handler.
+; CHECK-LABEL: "?catch$8@?0?test@4HA":
+; CHECK: .seh_endprologue
+; CHECK: movq -16(%rbp), %rax
+; CHECK: movb $0, (%rax)
+
+define i32* @test(i32* %a) personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) {
+entry:
+ %call = call i32 @f()
+ %p = bitcast i32* %a to i8*
+ br i1 undef, label %if.end, label %if.else
+
+if.else: ; preds = %entry
+ br i1 undef, label %cond.false.i, label %if.else.else
+
+if.else.else: ; preds = %if.else
+ br i1 undef, label %cond.true.i, label %cond.false.i
+
+cond.true.i: ; preds = %if.else.else
+ br label %invoke.cont
+
+cond.false.i: ; preds = %if.else.else, %if.else
+ %call.i = invoke i32 @f()
+ to label %invoke.cont unwind label %catch.dispatch
+
+catch.dispatch: ; preds = %cond.false.i
+ %tmp0 = catchswitch within none [label %catch] unwind label %ehcleanup
+
+catch: ; preds = %catch.dispatch
+ %tmp1 = catchpad within %tmp0 [i8* null, i32 64, i8* null]
+ %p.0 = getelementptr inbounds i8, i8* %p, i64 0
+ store i8 0, i8* %p.0, align 8
+ invoke void @_CxxThrowException(i8* null, %eh.ThrowInfo* null) [ "funclet"(token %tmp1) ]
+ to label %noexc unwind label %ehcleanup
+
+noexc: ; preds = %catch
+ unreachable
+
+invoke.cont: ; preds = %cond.false.i, %cond.true.i
+ %cond.i = phi i32 [ %call, %cond.true.i ], [ %call.i, %cond.false.i ]
+ %cmp = icmp eq i32 %cond.i, -1
+ %tmp3 = select i1 %cmp, i32 4, i32 0
+ br label %if.end
+
+if.end: ; preds = %invoke.cont, %entry
+ %state.0 = phi i32 [ %tmp3, %invoke.cont ], [ 4, %entry ]
+ %p.1 = getelementptr inbounds i8, i8* %p, i64 0
+ invoke void @g(i8* %p.1, i32 %state.0)
+ to label %invoke.cont.1 unwind label %ehcleanup
+
+invoke.cont.1: ; preds = %if.end
+ ret i32* %a
+
+ehcleanup: ; preds = %if.end, %catch, %catch.dispatch
+ %tmp4 = cleanuppad within none []
+ cleanupret from %tmp4 unwind to caller
+}
+
+%eh.ThrowInfo = type { i32, i32, i32, i32 }
+
+declare i32 @__CxxFrameHandler3(...)
+
+declare void @_CxxThrowException(i8*, %eh.ThrowInfo*)
+
+declare i32 @f()
+declare void @g(i8*, i32)
diff --git a/test/CodeGen/X86/shrink-wrap-chkstk.ll b/test/CodeGen/X86/shrink-wrap-chkstk.ll
index c0b2b45e676f..aecae89aee56 100644
--- a/test/CodeGen/X86/shrink-wrap-chkstk.ll
+++ b/test/CodeGen/X86/shrink-wrap-chkstk.ll
@@ -1,6 +1,8 @@
; RUN: llc < %s -enable-shrink-wrap=true | FileCheck %s
; chkstk cannot come before the usual prologue, since it adjusts ESP.
+; If chkstk is used in the prologue, we also have to be careful about preserving
+; EAX if it is used.
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
target triple = "i686-pc-windows-msvc18.0.0"
@@ -35,3 +37,36 @@ bb2:
; CHECK: retl
declare void @inalloca_params(<{ %struct.S }>* inalloca)
+
+declare i32 @doSomething(i32, i32*)
+
+; In this test case, we force usage of EAX before the prologue, and have to
+; compensate before calling __chkstk. It would also be valid for us to avoid
+; shrink wrapping in this case.
+
+define x86_fastcallcc i32 @use_eax_before_prologue(i32 inreg %a, i32 inreg %b) {
+ %tmp = alloca i32, i32 1024, align 4
+ %tmp2 = icmp slt i32 %a, %b
+ br i1 %tmp2, label %true, label %false
+
+true:
+ store i32 %a, i32* %tmp, align 4
+ %tmp4 = call i32 @doSomething(i32 0, i32* %tmp)
+ br label %false
+
+false:
+ %tmp.0 = phi i32 [ %tmp4, %true ], [ %a, %0 ]
+ ret i32 %tmp.0
+}
+
+; CHECK-LABEL: @use_eax_before_prologue@8: # @use_eax_before_prologue
+; CHECK: movl %ecx, %eax
+; CHECK: cmpl %edx, %eax
+; CHECK: jge LBB1_2
+; CHECK: pushl %eax
+; CHECK: movl $4100, %eax
+; CHECK: calll __chkstk
+; CHECK: movl 4100(%esp), %eax
+; CHECK: calll _doSomething
+; CHECK: LBB1_2:
+; CHECK: retl
diff --git a/test/MC/Sparc/sparc-ctrl-instructions.s b/test/MC/Sparc/sparc-ctrl-instructions.s
index bcb625b17e61..ccfa36a0b143 100644
--- a/test/MC/Sparc/sparc-ctrl-instructions.s
+++ b/test/MC/Sparc/sparc-ctrl-instructions.s
@@ -124,6 +124,18 @@
! CHECK-NEXT: ! fixup A - offset: 0, value: .BB0, kind: fixup_sparc_br22
bvs .BB0
+ ! CHECK: fba .BB0 ! encoding: [0x11,0b10AAAAAA,A,A]
+ ! CHECK-NEXT: ! fixup A - offset: 0, value: .BB0, kind: fixup_sparc_br22
+ fba .BB0
+
+ ! CHECK: fba .BB0 ! encoding: [0x11,0b10AAAAAA,A,A]
+ ! CHECK-NEXT: ! fixup A - offset: 0, value: .BB0, kind: fixup_sparc_br22
+ fb .BB0
+
+ ! CHECK: fbn .BB0 ! encoding: [0x01,0b10AAAAAA,A,A]
+ ! CHECK-NEXT: ! fixup A - offset: 0, value: .BB0, kind: fixup_sparc_br22
+ fbn .BB0
+
! CHECK: fbu .BB0 ! encoding: [0x0f,0b10AAAAAA,A,A]
! CHECK-NEXT: ! fixup A - offset: 0, value: .BB0, kind: fixup_sparc_br22
fbu .BB0
@@ -131,6 +143,7 @@
! CHECK: fbg .BB0 ! encoding: [0x0d,0b10AAAAAA,A,A]
! CHECK-NEXT: ! fixup A - offset: 0, value: .BB0, kind: fixup_sparc_br22
fbg .BB0
+
! CHECK: fbug .BB0 ! encoding: [0x0b,0b10AAAAAA,A,A]
! CHECK-NEXT: ! fixup A - offset: 0, value: .BB0, kind: fixup_sparc_br22
fbug .BB0
diff --git a/test/MC/Sparc/sparc64-ctrl-instructions.s b/test/MC/Sparc/sparc64-ctrl-instructions.s
index 65bca2990f15..0e7ea25cab94 100644
--- a/test/MC/Sparc/sparc64-ctrl-instructions.s
+++ b/test/MC/Sparc/sparc64-ctrl-instructions.s
@@ -770,6 +770,18 @@
! CHECK-NEXT: ! fixup A - offset: 0, value: .BB0, kind: fixup_sparc_br19
bpos,a,pt %xcc, .BB0
+ ! CHECK: fba %fcc0, .BB0 ! encoding: [0x11,0b01001AAA,A,A]
+ ! CHECK-NEXT: ! fixup A - offset: 0, value: .BB0, kind: fixup_sparc_br19
+ fba %fcc0, .BB0
+
+ ! CHECK: fba %fcc0, .BB0 ! encoding: [0x11,0b01001AAA,A,A]
+ ! CHECK-NEXT: ! fixup A - offset: 0, value: .BB0, kind: fixup_sparc_br19
+ fb %fcc0, .BB0
+
+ ! CHECK: fbn %fcc0, .BB0 ! encoding: [0x01,0b01001AAA,A,A]
+ ! CHECK-NEXT: ! fixup A - offset: 0, value: .BB0, kind: fixup_sparc_br19
+ fbn %fcc0, .BB0
+
! CHECK: fbu %fcc0, .BB0 ! encoding: [0x0f,0b01001AAA,A,A]
! CHECK-NEXT: ! fixup A - offset: 0, value: .BB0, kind: fixup_sparc_br19
fbu %fcc0, .BB0
diff --git a/test/MC/X86/x86_nop.s b/test/MC/X86/x86_nop.s
index feac4e4cf039..572487bfdaca 100644
--- a/test/MC/X86/x86_nop.s
+++ b/test/MC/X86/x86_nop.s
@@ -22,7 +22,13 @@ inc %eax
inc %eax
// CHECK: 0: 40 incl %eax
-// CHECK: 1: 8d b4 26 00 00 00 00 leal (%esi), %esi
+// CHECK: 1: 90 nop
+// CHECK: 2: 90 nop
+// CHECK: 3: 90 nop
+// CHECK: 4: 90 nop
+// CHECK: 5: 90 nop
+// CHECK: 6: 90 nop
+// CHECK: 7: 90 nop
// CHECK: 8: 40 incl %eax
diff --git a/test/Transforms/InstCombine/fprintf-1.ll b/test/Transforms/InstCombine/fprintf-1.ll
index 6d21f39d4fd6..cb364102c7f3 100644
--- a/test/Transforms/InstCombine/fprintf-1.ll
+++ b/test/Transforms/InstCombine/fprintf-1.ll
@@ -61,6 +61,15 @@ define void @test_simplify4(%FILE* %fp) {
; CHECK-IPRINTF-NEXT: ret void
}
+define void @test_simplify5(%FILE* %fp) {
+; CHECK-LABEL: @test_simplify5(
+ %fmt = getelementptr [13 x i8], [13 x i8]* @hello_world, i32 0, i32 0
+ call i32 (%FILE*, i8*, ...) @fprintf(%FILE* %fp, i8* %fmt) [ "deopt"() ]
+; CHECK-NEXT: call i32 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @hello_world, i32 0, i32 0), i32 12, i32 1, %FILE* %fp) [ "deopt"() ]
+ ret void
+; CHECK-NEXT: ret void
+}
+
define void @test_no_simplify1(%FILE* %fp) {
; CHECK-IPRINTF-LABEL: @test_no_simplify1(
%fmt = getelementptr [3 x i8], [3 x i8]* @percent_f, i32 0, i32 0
diff --git a/test/Transforms/LoopStrengthReduce/funclet.ll b/test/Transforms/LoopStrengthReduce/funclet.ll
index 5d20646141c4..1bee3706cafa 100644
--- a/test/Transforms/LoopStrengthReduce/funclet.ll
+++ b/test/Transforms/LoopStrengthReduce/funclet.ll
@@ -214,3 +214,32 @@ try.cont.7: ; preds = %try.cont
; CHECK: catch.dispatch.2:
; CHECK: %e.0 = phi i32* [ %c, %try.cont ], [ %b, %catch.dispatch ]
+
+define i32 @test2() personality i32 (...)* @_except_handler3 {
+entry:
+ br label %for.body
+
+for.body: ; preds = %for.inc, %entry
+ %phi = phi i32 [ %inc, %for.inc ], [ 0, %entry ]
+ invoke void @reserve()
+ to label %for.inc unwind label %catch.dispatch
+
+catch.dispatch: ; preds = %for.body
+ %tmp18 = catchswitch within none [label %catch.handler] unwind to caller
+
+catch.handler: ; preds = %catch.dispatch
+ %phi.lcssa = phi i32 [ %phi, %catch.dispatch ]
+ %tmp19 = catchpad within %tmp18 [i8* null]
+ catchret from %tmp19 to label %done
+
+done:
+ ret i32 %phi.lcssa
+
+for.inc: ; preds = %for.body
+ %inc = add i32 %phi, 1
+ br label %for.body
+}
+
+; CHECK-LABEL: define i32 @test2(
+; CHECK: %phi.lcssa = phi i32 [ %phi, %catch.dispatch ]
+; CHECK-NEXT: catchpad within
diff --git a/test/Transforms/LoopVectorize/PowerPC/stride-vectorization.ll b/test/Transforms/LoopVectorize/PowerPC/stride-vectorization.ll
index 0cb845520246..f6f2609e8fbe 100644
--- a/test/Transforms/LoopVectorize/PowerPC/stride-vectorization.ll
+++ b/test/Transforms/LoopVectorize/PowerPC/stride-vectorization.ll
@@ -16,9 +16,15 @@ for.cond.cleanup: ; preds = %for.body
for.body: ; preds = %for.body, %entry
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
%0 = shl nsw i64 %indvars.iv, 1
+ %odd.idx = add nsw i64 %0, 1
+
%arrayidx = getelementptr inbounds double, double* %b, i64 %0
+ %arrayidx.odd = getelementptr inbounds double, double* %b, i64 %odd.idx
+
%1 = load double, double* %arrayidx, align 8
- %add = fadd double %1, 1.000000e+00
+ %2 = load double, double* %arrayidx.odd, align 8
+
+ %add = fadd double %1, %2
%arrayidx2 = getelementptr inbounds double, double* %a, i64 %indvars.iv
store double %add, double* %arrayidx2, align 8
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
diff --git a/test/Transforms/LoopVectorize/X86/reg-usage.ll b/test/Transforms/LoopVectorize/X86/reg-usage.ll
deleted file mode 100644
index 47a6e1029eda..000000000000
--- a/test/Transforms/LoopVectorize/X86/reg-usage.ll
+++ /dev/null
@@ -1,71 +0,0 @@
-; RUN: opt < %s -debug-only=loop-vectorize -loop-vectorize -vectorizer-maximize-bandwidth -O2 -S 2>&1 | FileCheck %s
-; REQUIRES: asserts
-
-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-S128"
-target triple = "x86_64-unknown-linux-gnu"
-
-@a = global [1024 x i8] zeroinitializer, align 16
-@b = global [1024 x i8] zeroinitializer, align 16
-
-define i32 @foo() {
-; This function has a loop of SAD pattern. Here we check when VF = 16 the
-; register usage doesn't exceed 16.
-;
-; CHECK-LABEL: foo
-; CHECK: LV(REG): VF = 4
-; CHECK-NEXT: LV(REG): Found max usage: 4
-; CHECK: LV(REG): VF = 8
-; CHECK-NEXT: LV(REG): Found max usage: 7
-; CHECK: LV(REG): VF = 16
-; CHECK-NEXT: LV(REG): Found max usage: 13
-
-entry:
- br label %for.body
-
-for.cond.cleanup:
- %add.lcssa = phi i32 [ %add, %for.body ]
- ret i32 %add.lcssa
-
-for.body:
- %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
- %s.015 = phi i32 [ 0, %entry ], [ %add, %for.body ]
- %arrayidx = getelementptr inbounds [1024 x i8], [1024 x i8]* @a, i64 0, i64 %indvars.iv
- %0 = load i8, i8* %arrayidx, align 1
- %conv = zext i8 %0 to i32
- %arrayidx2 = getelementptr inbounds [1024 x i8], [1024 x i8]* @b, i64 0, i64 %indvars.iv
- %1 = load i8, i8* %arrayidx2, align 1
- %conv3 = zext i8 %1 to i32
- %sub = sub nsw i32 %conv, %conv3
- %ispos = icmp sgt i32 %sub, -1
- %neg = sub nsw i32 0, %sub
- %2 = select i1 %ispos, i32 %sub, i32 %neg
- %add = add nsw i32 %2, %s.015
- %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
- %exitcond = icmp eq i64 %indvars.iv.next, 1024
- br i1 %exitcond, label %for.cond.cleanup, label %for.body
-}
-
-define i64 @bar(i64* nocapture %a) {
-; CHECK-LABEL: bar
-; CHECK: LV(REG): VF = 2
-; CHECK: LV(REG): Found max usage: 4
-;
-entry:
- br label %for.body
-
-for.cond.cleanup:
- %add2.lcssa = phi i64 [ %add2, %for.body ]
- ret i64 %add2.lcssa
-
-for.body:
- %i.012 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
- %s.011 = phi i64 [ 0, %entry ], [ %add2, %for.body ]
- %arrayidx = getelementptr inbounds i64, i64* %a, i64 %i.012
- %0 = load i64, i64* %arrayidx, align 8
- %add = add nsw i64 %0, %i.012
- store i64 %add, i64* %arrayidx, align 8
- %add2 = add nsw i64 %add, %s.011
- %inc = add nuw nsw i64 %i.012, 1
- %exitcond = icmp eq i64 %inc, 1024
- br i1 %exitcond, label %for.cond.cleanup, label %for.body
-}
diff --git a/test/Transforms/LoopVectorize/X86/vector_max_bandwidth.ll b/test/Transforms/LoopVectorize/X86/vector_max_bandwidth.ll
index fe9d59efc8b3..e6dc39c2afad 100644
--- a/test/Transforms/LoopVectorize/X86/vector_max_bandwidth.ll
+++ b/test/Transforms/LoopVectorize/X86/vector_max_bandwidth.ll
@@ -16,7 +16,7 @@ target triple = "x86_64-unknown-linux-gnu"
; -vectorizer-maximize-bandwidth is indicated.
;
; CHECK-label: foo
-; CHECK: LV: Selecting VF: 32.
+; CHECK: LV: Selecting VF: 16.
define void @foo() {
entry:
br label %for.body
diff --git a/test/Transforms/LoopVectorize/interleaved-accesses.ll b/test/Transforms/LoopVectorize/interleaved-accesses.ll
index d7237a5c27dc..54ce3e29293a 100644
--- a/test/Transforms/LoopVectorize/interleaved-accesses.ll
+++ b/test/Transforms/LoopVectorize/interleaved-accesses.ll
@@ -292,10 +292,8 @@ for.body: ; preds = %for.body, %entry
; }
; CHECK-LABEL: @even_load(
-; CHECK: %wide.vec = load <8 x i32>, <8 x i32>* %{{.*}}, align 4
-; CHECK: %strided.vec = shufflevector <8 x i32> %wide.vec, <8 x i32> undef, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
-; CHECK-NOT: shufflevector <8 x i32> %wide.vec, <8 x i32> undef, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
-; CHECK: shl nsw <4 x i32> %strided.vec, <i32 1, i32 1, i32 1, i32 1>
+; CHECK-NOT: %wide.vec = load <8 x i32>, <8 x i32>* %{{.*}}, align 4
+; CHECK-NOT: %strided.vec = shufflevector <8 x i32> %wide.vec, <8 x i32> undef, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
define void @even_load(i32* noalias nocapture readonly %A, i32* noalias nocapture %B) {
entry:
diff --git a/test/Transforms/PruneEH/pr26263.ll b/test/Transforms/PruneEH/pr26263.ll
new file mode 100644
index 000000000000..17fafeb68505
--- /dev/null
+++ b/test/Transforms/PruneEH/pr26263.ll
@@ -0,0 +1,56 @@
+; RUN: opt -prune-eh -S < %s | FileCheck %s
+target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
+target triple = "i386-pc-windows-msvc"
+
+declare void @neverthrows() nounwind
+
+define void @test1() personality i32 (...)* @__CxxFrameHandler3 {
+ invoke void @neverthrows()
+ to label %try.cont unwind label %cleanuppad
+
+try.cont:
+ ret void
+
+cleanuppad:
+ %cp = cleanuppad within none []
+ br label %cleanupret
+
+cleanupret:
+ cleanupret from %cp unwind to caller
+}
+
+; CHECK-LABEL: define void @test1(
+; CHECK: call void @neverthrows()
+
+; CHECK: %[[cp:.*]] = cleanuppad within none []
+; CHECK-NEXT: unreachable
+
+; CHECK: cleanupret from %[[cp]] unwind to caller
+
+define void @test2() personality i32 (...)* @__CxxFrameHandler3 {
+ invoke void @neverthrows()
+ to label %try.cont unwind label %catchswitch
+
+try.cont:
+ ret void
+
+catchswitch:
+ %cs = catchswitch within none [label %catchpad] unwind to caller
+
+catchpad:
+ %cp = catchpad within %cs []
+ unreachable
+
+ret:
+ ret void
+}
+
+; CHECK-LABEL: define void @test2(
+; CHECK: call void @neverthrows()
+
+; CHECK: %[[cs:.*]] = catchswitch within none [label
+
+; CHECK: catchpad within %[[cs]] []
+; CHECK-NEXT: unreachable
+
+declare i32 @__CxxFrameHandler3(...)