37 lines · plain
1; RUN: opt -passes=loop-versioning -S < %s | FileCheck %s2; Checks that when introducing check, we don't accidentally introduce non-dominating instructions3target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"4 5%Dual.212 = type { %Dual.213, %Partials.215 }6%Dual.213 = type { double, %Partials.214 }7%Partials.214 = type { [2 x double] }8%Partials.215 = type { [2 x %Dual.213] }9 10; Function Attrs: sspreq11define void @"julia_axpy!_65480"(ptr, ptr %other) {12top:13 br label %if2414 15; CHECK-NOT: %bc = bitcast ptr %v2.sroa.0.0..sroa_cast16; CHECK: %bound0 = icmp ult ptr %[[x:[a-z0-9]+]], %[[y:[a-z0-9]+]]17; CHECK-NOT: %bound1 = icmp ult ptr %[[y]], %[[x]]18 19if24: ; preds = %if24, %top20 %"#temp#1.sroa.3.02" = phi i64 [ undef, %top ], [ %2, %if24 ]21 %"#temp#1.sroa.0.01" = phi i64 [ undef, %top ], [ %1, %if24 ]22 %1 = add i64 %"#temp#1.sroa.0.01", 123 %2 = add i64 %"#temp#1.sroa.3.02", 124 ; This pointer is loop invariant. LAA used to re-use it from memcheck, even though it didn't dominate.25 %v2.sroa.0.0.copyload = load i64, ptr %0, align 126 %3 = add i64 %"#temp#1.sroa.0.01", -127 %4 = getelementptr inbounds %Dual.212, ptr %other, i64 0, i32 1, i32 0, i64 0, i32 1, i32 0, i64 028 store i64 undef, ptr %4, align 829 %notlhs27 = icmp eq i64 %2, undef30 %notrhs28 = icmp eq i64 %1, undef31 %5 = or i1 %notrhs28, %notlhs2732 br i1 %5, label %L41.L335_crit_edge, label %if2433 34L41.L335_crit_edge: ; preds = %if2435 ret void36}37