89 lines · plain
1; RUN: opt < %s -S -passes=speculative-execution \2; RUN: -spec-exec-max-speculation-cost 4 -spec-exec-max-not-hoisted 3 \3; RUN: | FileCheck %s4 5; CHECK-LABEL: @ifThen_shuffle(6; CHECK: shufflevector7; CHECK: br i1 true8define void @ifThen_shuffle() {9 br i1 true, label %a, label %b10 11a:12 %x = shufflevector <2 x float> undef, <2 x float> undef, <2 x i32> zeroinitializer13 br label %b14 15b:16 ret void17}18 19; CHECK-LABEL: @ifThen_extract(20; CHECK: extractelement21; CHECK: br i1 true22define void @ifThen_extract() {23 br i1 true, label %a, label %b24 25a:26 %x = extractelement <2 x float> undef, i32 127 br label %b28 29b:30 ret void31}32 33 34; CHECK-LABEL: @ifThen_insert(35; CHECK: insertelement36; CHECK: br i1 true37define void @ifThen_insert() {38 br i1 true, label %a, label %b39 40a:41 %x = insertelement <2 x float> undef, float undef, i32 142 br label %b43 44b:45 ret void46}47 48; CHECK-LABEL: @ifThen_extractvalue(49; CHECK: extractvalue50; CHECK: br i1 true51define void @ifThen_extractvalue() {52 br i1 true, label %a, label %b53 54a:55 %x = extractvalue { i32, i32 } undef, 056 br label %b57 58b:59 ret void60}61 62; CHECK-LABEL: @ifThen_insertvalue(63; CHECK: insertvalue64; CHECK: br i1 true65define void @ifThen_insertvalue() {66 br i1 true, label %a, label %b67 68a:69 %x = insertvalue { i32, i32 } undef, i32 undef, 070 br label %b71 72b:73 ret void74}75 76; CHECK-LABEL: @ifThen_freeze(77; CHECK: freeze78; CHECK: br i1 true79define void @ifThen_freeze() {80 br i1 true, label %a, label %b81 82a:83 %x = freeze i32 undef84 br label %b85 86b:87 ret void88}89