Skip to content

Commit

Permalink
Fix illegal invariant group on unwrap (rust-lang#905)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses authored Oct 18, 2022
1 parent 17b83da commit 65150b8
Show file tree
Hide file tree
Showing 23 changed files with 119 additions and 71 deletions.
11 changes: 0 additions & 11 deletions enzyme/Enzyme/GradientUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5241,17 +5241,6 @@ Value *GradientUtils::lookupM(Value *val, IRBuilder<> &BuilderM,
if (op) {
assert(op);
assert(op->getType());
if (auto load_op = dyn_cast<LoadInst>(prelcssaInst)) {
if (auto new_op = dyn_cast<LoadInst>(op)) {
MDNode *invgroup =
load_op->getMetadata(LLVMContext::MD_invariant_group);
if (invgroup == nullptr) {
invgroup = MDNode::getDistinct(load_op->getContext(), {});
load_op->setMetadata(LLVMContext::MD_invariant_group, invgroup);
}
new_op->setMetadata(LLVMContext::MD_invariant_group, invgroup);
}
}
if (op->getType() != inst->getType()) {
llvm::errs() << " op: " << *op << " inst: " << *inst << "\n";
}
Expand Down
2 changes: 1 addition & 1 deletion enzyme/test/Enzyme/ReverseMode/alloclut.ll
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ declare double @__enzyme_autodiff(double (double, i32*)*, ...)
; CHECK-NEXT: %9 = getelementptr inbounds [2 x double], [2 x double]* %val_malloccache, i64 %"iv'ac.0"
; CHECK-NEXT: %idx_unwrap = add i64 %"iv'ac.0", %"iv1'ac.0"
; CHECK-NEXT: %zgep_unwrap = getelementptr inbounds i32, i32* %z, i64 %idx_unwrap
; CHECK-NEXT: %lu_unwrap = load i32, i32* %zgep_unwrap, align 4, !invariant.group !
; CHECK-NEXT: %lu_unwrap = load i32, i32* %zgep_unwrap, align 4
; CHECK-NEXT: %10 = getelementptr inbounds [2 x double], [2 x double]* %9, i64 0, i32 %lu_unwrap
; CHECK-NEXT: %11 = load double, double* %10, align 8, !invariant.group !
; CHECK-NEXT: %m0diffeval = fmul fast double %"add'de.1", %11
Expand Down
2 changes: 1 addition & 1 deletion enzyme/test/Enzyme/ReverseMode/allocnotape.ll
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ attributes #4 = { nounwind }
; CHECK: invertfor.body5: ; preds = %for.body5, %incinvertfor.body5
; CHECK-NEXT: %"iv1'ac.0" = phi i64 [ %[[a7:.+]], %incinvertfor.body5 ], [ 19, %for.body5 ]
; CHECK-NEXT: %arrayidx9_unwrap = getelementptr inbounds [20 x i32], [20 x i32]* %tmp, i64 0, i64 %"iv1'ac.0"
; CHECK-NEXT: %_unwrap = load i32, i32* %arrayidx9_unwrap, align 4, !tbaa ![[itbaa]], !invariant.group !
; CHECK-NEXT: %_unwrap = load i32, i32* %arrayidx9_unwrap, align 4, !tbaa ![[itbaa]]
; CHECK-NEXT: %conv_unwrap = sitofp i32 %_unwrap to double
; CHECK-NEXT: %m0diffe = fmul fast double %conv_unwrap, %differeturn
; CHECK-NEXT: %"arrayidx7'ipg_unwrap" = getelementptr inbounds double, double* %"x'", i64 %"iv1'ac.0"
Expand Down
6 changes: 3 additions & 3 deletions enzyme/test/Enzyme/ReverseMode/condswload.ll
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,17 @@ entry:

; CHECK: invertend_phirc: ; preds = %invertend
; CHECK-NEXT: %g3_unwrap = getelementptr inbounds double, double* %a, i32 128
; CHECK-NEXT: %l3_unwrap = load double, double* %g3_unwrap, align 8, !invariant.group !
; CHECK-NEXT: %l3_unwrap = load double, double* %g3_unwrap, align 8
; CHECK-NEXT: br label %invertend_phimerge

; CHECK: invertend_phirc1: ; preds = %invertend
; CHECK-NEXT: %g1_unwrap = getelementptr inbounds double, double* %a, i32 32
; CHECK-NEXT: %l1_unwrap = load double, double* %g1_unwrap, align 8, !invariant.group !
; CHECK-NEXT: %l1_unwrap = load double, double* %g1_unwrap, align 8
; CHECK-NEXT: br label %invertend_phimerge

; CHECK: invertend_phirc2: ; preds = %invertend
; CHECK-NEXT: %g2_unwrap = getelementptr inbounds double, double* %a, i32 64
; CHECK-NEXT: %l2_unwrap = load double, double* %g2_unwrap, align 8, !invariant.group !
; CHECK-NEXT: %l2_unwrap = load double, double* %g2_unwrap, align 8
; CHECK-NEXT: br label %invertend_phimerge

; CHECK: invertend_phimerge:
Expand Down
12 changes: 6 additions & 6 deletions enzyme/test/Enzyme/ReverseMode/duplicatemallocsubloop_set.ll
Original file line number Diff line number Diff line change
Expand Up @@ -124,21 +124,21 @@ attributes #9 = { nounwind }
; CHECK-DAG: %[[a6_unwrap1:.+]] = bitcast i8* %remat_a5 to double*
; CHECK-DAG: %[[_unwrap2:.+]] = trunc i64 %"iv'ac.0" to i32
; CHECK-DAG: %[[a10_unwrap:.+]] = getelementptr inbounds double, double* %a1, i32 %[[_unwrap2]]
; CHECK-DAG: %[[a11_unwrap:.+]] = load double, double* %[[a10_unwrap]], align 8, !invariant.group !
; CHECK-DAG: %[[a11_unwrap:.+]] = load double, double* %[[a10_unwrap]], align 8
; CHECK-NEXT: store double %[[a11_unwrap]], double* %[[a6_unwrap1]], align 8
; CHECK-NEXT: %_unwrap = trunc i64 %"iv'ac.0" to i32
; CHECK-NEXT: %"a13'ipg_unwrap" = getelementptr inbounds double, double* %"a0'", i32 %_unwrap
; CHECK-NEXT: %2 = load double, double* %"a13'ipg_unwrap", align 8
; CHECK-NEXT: store double 0.000000e+00, double* %"a13'ipg_unwrap", align 8, !alias.scope !12, !noalias !15
; CHECK-NEXT: store double 0.000000e+00, double* %"a13'ipg_unwrap", align 8, !alias.scope !11, !noalias !14
; CHECK-NEXT: %a6_unwrap = bitcast i8* %remat_a5 to double*
; CHECK-NEXT: %"a6'ipc_unwrap" = bitcast i8* %"a5'mi" to double*
; CHECK-NEXT: call void @diffef(double* %a6_unwrap, double* %"a6'ipc_unwrap", double %2)
; CHECK-NEXT: %3 = load double, double* %"a6'ipc_unwrap", align 8, !noalias !11
; CHECK-NEXT: store double 0.000000e+00, double* %"a6'ipc_unwrap", align 8, !alias.scope !17, !noalias !20
; CHECK-NEXT: %3 = load double, double* %"a6'ipc_unwrap", align 8, !noalias !10
; CHECK-NEXT: store double 0.000000e+00, double* %"a6'ipc_unwrap", align 8, !alias.scope !16, !noalias !19
; CHECK-NEXT: %"a10'ipg_unwrap" = getelementptr inbounds double, double* %"a1'", i32 %_unwrap
; CHECK-NEXT: %4 = load double, double* %"a10'ipg_unwrap", align 8, !alias.scope !22, !noalias !25
; CHECK-NEXT: %4 = load double, double* %"a10'ipg_unwrap", align 8, !alias.scope !21, !noalias !24
; CHECK-NEXT: %5 = fadd fast double %4, %3
; CHECK-NEXT: store double %5, double* %"a10'ipg_unwrap", align 8, !alias.scope !22, !noalias !25
; CHECK-NEXT: store double %5, double* %"a10'ipg_unwrap", align 8, !alias.scope !21, !noalias !24
; CHECK-NEXT: call void @llvm.memset.p0i8.i64(i8* %"a5'mi", i8 0, i64 8, i1 false)
; CHECK-NEXT: tail call void @free(i8* nonnull %"a5'mi")
; CHECK-NEXT: tail call void @free(i8* %remat_a5)
Expand Down
8 changes: 4 additions & 4 deletions enzyme/test/Enzyme/ReverseMode/fwdsolve.ll
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ declare dso_local void @__enzyme_autodiff(i8*, ...)
; CHECK-NEXT: %iv.next2 = add nuw nsw i64 %iv1, 1
; CHECK-NEXT: %add = add i64 %iv1, %mul
; CHECK-NEXT: %arrayidx10 = getelementptr inbounds double, double* %L, i64 %add
; CHECK-NEXT: %3 = load double, double* %arrayidx10, align 8, !tbaa !2, !invariant.group !6
; CHECK-NEXT: %3 = load double, double* %arrayidx10, align 8, !tbaa !2
; CHECK-NEXT: %arrayidx11 = getelementptr inbounds double, double* %out, i64 %iv1
; CHECK-NEXT: %4 = load double, double* %arrayidx11, align 8, !tbaa !2, !invariant.group !7
; CHECK-NEXT: %4 = load double, double* %arrayidx11, align 8, !tbaa !2
; CHECK-NEXT: %mul12 = fmul double %3, %4
; CHECK-NEXT: %sub13 = fsub double %tmp.034, %mul12
; CHECK-NEXT: %exitcond = icmp eq i64 %iv.next2, %[[i1]]
Expand Down Expand Up @@ -145,12 +145,12 @@ declare dso_local void @__enzyme_autodiff(i8*, ...)
; CHECK-NEXT: %[[i11:.+]] = {{(fadd|fsub)}} fast double %"mul12'de.1"
; , %[[i9]]
; CHECK-NEXT: %arrayidx11_unwrap = getelementptr inbounds double, double* %out, i64 %"iv1'ac.0"
; CHECK-NEXT: %_unwrap = load double, double* %arrayidx11_unwrap, align 8, !tbaa !2, !invariant.group !7
; CHECK-NEXT: %_unwrap = load double, double* %arrayidx11_unwrap, align 8, !tbaa !2
; CHECK-NEXT: %m0diffe = fmul fast double %[[i11]], %_unwrap
; CHECK-NEXT: %mul_unwrap = mul i64 %"iv'ac.0", %N
; CHECK-NEXT: %add_unwrap = add i64 %"iv1'ac.0", %mul_unwrap
; CHECK-NEXT: %arrayidx10_unwrap = getelementptr inbounds double, double* %L, i64 %add_unwrap
; CHECK-NEXT: %[[_unwrap3:.+]] = load double, double* %arrayidx10_unwrap, align 8, !tbaa !2, !invariant.group !6
; CHECK-NEXT: %[[_unwrap3:.+]] = load double, double* %arrayidx10_unwrap, align 8, !tbaa !2
; CHECK-NEXT: %m1diffe = fmul fast double %[[i11]], %[[_unwrap3]]
; CHECK-NEXT: %[[i12:.+]] = fadd fast double %"'de2.1", %m0diffe
; CHECK-NEXT: %[[i13:.+]] = fadd fast double %"'de3.1", %m1diffe
Expand Down
2 changes: 1 addition & 1 deletion enzyme/test/Enzyme/ReverseMode/infAllocR.ll
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ attributes #3 = { nounwind }
; CHECK-NEXT: store double 0.000000e+00, double* %"arrayidx5'ipg_unwrap", align 8
; CHECK-NEXT: %m0diffei10 = fmul fast double %[[i6]], %rho0
; CHECK-NEXT: %[[arrayidx4_unwrap5:.+]] = getelementptr inbounds double, double* %i4_unwrap, i64 %"iv1'ac.0"
; CHECK-NEXT: %[[i10_unwrap6:.+]] = load double, double* %[[arrayidx4_unwrap5]], align 8, !invariant.group !
; CHECK-NEXT: %[[i10_unwrap6:.+]] = load double, double* %[[arrayidx4_unwrap5]], align 8
; CHECK-NEXT: %m1differho0 = fmul fast double %[[i6]], %[[i10_unwrap6]]
; CHECK-NEXT: %[[i8]] = fadd fast double %"rho0'de.0", %m1differho0
; CHECK-NEXT: %"arrayidx4'ipg_unwrap" = getelementptr inbounds double, double* %"i4'ipc_unwrap8", i64 %"iv1'ac.0"
Expand Down
2 changes: 1 addition & 1 deletion enzyme/test/Enzyme/ReverseMode/infAllocR_2.ll
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ attributes #3 = { nounwind }
; CHECK-NEXT: %m0diffei10 = fmul fast double %[[i10]], %rho0
; CHECK-NEXT: %[[sub_unwrap4:.+]] = sub i64 %"iv1'ac.0", 1
; CHECK-NEXT: %[[arrayidx4_unwrap5:.+]] = getelementptr inbounds double, double* %i4_unwrap, i64 %[[sub_unwrap4]]
; CHECK-NEXT: %[[i10_unwrap6:.+]] = load double, double* %[[arrayidx4_unwrap5]], align 8, !invariant.group !
; CHECK-NEXT: %[[i10_unwrap6:.+]] = load double, double* %[[arrayidx4_unwrap5]], align 8
; CHECK-NEXT: %m1differho0 = fmul fast double %[[i10]], %[[i10_unwrap6]]
; CHECK-NEXT: %[[i11:.+]] = fadd fast double %"i10'de.1", %m0diffei10
; CHECK-NEXT: %[[i12]] = fadd fast double %"rho0'de.1", %m1differho0
Expand Down
2 changes: 1 addition & 1 deletion enzyme/test/Enzyme/ReverseMode/loopremat.ll
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ attributes #4 = { nounwind }

; CHECK: remat_loop_loopExit: ; preds = %remat_loop_setLoop
; CHECK-NEXT: %i7_unwrap = getelementptr inbounds [30 x double], [30 x double]* %i, i64 0, i64 %"iv'ac.0"
; CHECK-NEXT: %i8_unwrap = load double, double* %i7_unwrap, align 8, !tbaa !2, !invariant.group !
; CHECK-NEXT: %i8_unwrap = load double, double* %i7_unwrap, align 8, !tbaa !2
; CHECK-NEXT: %m0diffei8 = fmul fast double %"i10'de.0", %i8_unwrap
; CHECK-NEXT: %20 = fadd fast double %m0diffei8, %m0diffei8
; CHECK-NEXT: %"i7'ipg_unwrap" = getelementptr inbounds [30 x double], [30 x double]* %"i'ipa", i64 0, i64 %"iv'ac.0"
Expand Down
2 changes: 1 addition & 1 deletion enzyme/test/Enzyme/ReverseMode/looprematmalloc.ll
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ attributes #4 = { nounwind }

; CHECK: remat_loop_loopExit: ; preds = %remat_loop_setLoop
; CHECK-NEXT: %i7_unwrap = getelementptr inbounds [30 x double], [30 x double]* %i_unwrap, i64 0, i64 %"iv'ac.0"
; CHECK-NEXT: %i8_unwrap = load double, double* %i7_unwrap, align 8, !tbaa !2, !invariant.group !
; CHECK-NEXT: %i8_unwrap = load double, double* %i7_unwrap, align 8, !tbaa !2
; CHECK-NEXT: %m0diffei8 = fmul fast double %"i10'de.0", %i8_unwrap
; CHECK-NEXT: %20 = fadd fast double %m0diffei8, %m0diffei8
; CHECK-NEXT: %"i'ipc_unwrap8" = bitcast i8* %"i1'mi" to [30 x double]*
Expand Down
10 changes: 5 additions & 5 deletions enzyme/test/Enzyme/ReverseMode/maxlimitdouble.ll
Original file line number Diff line number Diff line change
Expand Up @@ -19128,22 +19128,22 @@ attributes #28 = { builtin }
; CHECK-NEXT: %minim132_unwrap = select i1 %tmp12_unwrap, i64 0, i64 %tmp18_unwrap
; CHECK-NEXT: %im1j_unwrap = add nuw nsw i64 %"iv1'ac.0", %minim132_unwrap
; CHECK-NEXT: %tmp43_unwrap = getelementptr inbounds double, double* %arg3, i64 %im1j_unwrap
; CHECK-NEXT: %vim1j_unwrap = load double, double* %tmp43_unwrap, align 8, !tbaa !31, !invariant.group !
; CHECK-NEXT: %vim1j_unwrap = load double, double* %tmp43_unwrap, align 8, !tbaa !31
; CHECK-NEXT: %tmp56_unwrap = fadd fast double %vim1j_unwrap, %v0
; CHECK-NEXT: %tmp13_unwrap = icmp eq i64 %"iv'ac.0", 31
; CHECK-NEXT: %ip132_unwrap = add i64 %i32_unwrap, 32
; CHECK-NEXT: %maxip132_unwrap = select i1 %tmp13_unwrap, i64 992, i64 %ip132_unwrap
; CHECK-NEXT: %ip1j_unwrap = add nuw nsw i64 %"iv1'ac.0", %maxip132_unwrap
; CHECK-NEXT: %tmp46_unwrap = getelementptr inbounds double, double* %arg3, i64 %ip1j_unwrap
; CHECK-NEXT: %vip1j_unwrap = load double, double* %tmp46_unwrap, align 8, !tbaa !31, !invariant.group !
; CHECK-NEXT: %vip1j_unwrap = load double, double* %tmp46_unwrap, align 8, !tbaa !31
; CHECK-NEXT: %tmp57_unwrap = fadd fast double %tmp56_unwrap, %vip1j_unwrap
; CHECK-NEXT: %endj_unwrap = icmp eq i64 %"iv1'ac.0", 31
; CHECK-NEXT: %iv.next2_unwrap = add nuw nsw i64 %"iv1'ac.0", 1
; CHECK-NEXT: %maxjp1_unwrap = select i1 %endj_unwrap, i64 31, i64 %iv.next2_unwrap
; CHECK-NEXT: %ijp1_unwrap = add i64 %maxjp1_unwrap, %i32_unwrap
; CHECK-NEXT: %ijp1AND_unwrap = and i64 %ijp1_unwrap, 4294967295
; CHECK-NEXT: %tmp50_unwrap = getelementptr inbounds double, double* %arg3, i64 %ijp1AND_unwrap
; CHECK-NEXT: %vijp1_unwrap = load double, double* %tmp50_unwrap, align 8, !tbaa !31, !invariant.group !
; CHECK-NEXT: %vijp1_unwrap = load double, double* %tmp50_unwrap, align 8, !tbaa !31
; CHECK-NEXT: %tmp58_unwrap = fadd fast double %tmp57_unwrap, %vijp1_unwrap
; CHECK-NEXT: %tmp28_unwrap = icmp eq i64 %"iv1'ac.0", 0
; CHECK-NEXT: %jm1_unwrap = add i64 %"iv1'ac.0", -1
Expand All @@ -19152,7 +19152,7 @@ attributes #28 = { builtin }
; CHECK-NEXT: %tmp31_ext_unwrap = zext i32 %tmp31_unwrap to i64
; CHECK-NEXT: %ijm1_unwrap = add i64 %tmp31_ext_unwrap, %i32_unwrap
; CHECK-NEXT: %tmp54_unwrap = getelementptr inbounds double, double* %arg3, i64 %ijm1_unwrap
; CHECK-NEXT: %vijm1_unwrap = load double, double* %tmp54_unwrap, align 8, !tbaa !31, !invariant.group !
; CHECK-NEXT: %vijm1_unwrap = load double, double* %tmp54_unwrap, align 8, !tbaa !31
; CHECK-NEXT: %sum_unwrap = fadd fast double %tmp58_unwrap, %vijm1_unwrap
; CHECK-NEXT: %m0diffeA = fmul fast double %7, %sum_unwrap
; CHECK-NEXT: %m1diffesum = fmul fast double %7, %A
Expand All @@ -19175,7 +19175,7 @@ attributes #28 = { builtin }
; CHECK-NEXT: %17 = fadd fast double %16, %m1diffesum
; CHECK-NEXT: store double %17, double* %"tmp43'ipg_unwrap", align 8
; CHECK-NEXT: %tmp33_unwrap = getelementptr inbounds double, double* %arg3, i64 %ij_unwrap
; CHECK-NEXT: %vij_unwrap = load double, double* %tmp33_unwrap, align 8, !tbaa !31, !invariant.group !
; CHECK-NEXT: %vij_unwrap = load double, double* %tmp33_unwrap, align 8, !tbaa !31
; CHECK-NEXT: %m0diffeterm2 = fmul fast double %7, %vij_unwrap
; CHECK-NEXT: %tmp61_unwrap = fmul fast double %vij_unwrap, %v0
; CHECK-NEXT: %term2_unwrap = fsub fast double %A, %tmp61_unwrap
Expand Down
4 changes: 2 additions & 2 deletions enzyme/test/Enzyme/ReverseMode/metacachelicm2.ll
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-
; CHECK-NEXT: %iv = phi i64 [ %iv.next, %for.cond.cleanup4 ], [ 0, %entry ]
; CHECK-NEXT: %iv.next = add nuw nsw i64 %iv, 1
; CHECK-NEXT: %arrayidx = getelementptr inbounds i64, i64* %array, i64 %iv
; CHECK-NEXT: %len = load i64, i64* %arrayidx, align 8, !tbaa !6, !invariant.group ![[g8:[0-9]+]]
; CHECK-NEXT: %len = load i64, i64* %arrayidx, align 8, !tbaa !6
; CHECK-NEXT: %0 = getelementptr inbounds double*, double** %ld_malloccache, i64 %iv
; CHECK-NEXT: %mallocsize = mul nuw nsw i64 %len, 8
; CHECK-NEXT: %[[malloccall3:.+]] = tail call noalias nonnull i8* @malloc(i64 %mallocsize)
Expand Down Expand Up @@ -132,7 +132,7 @@ attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-
; CHECK-NEXT: store double 0.000000e+00, double* %"arrayidx9'ipg_unwrap", align 8
; CHECK-NEXT: %10 = fadd fast double %"add'de.0", %9
; CHECK-NEXT: %arrayidx_unwrap = getelementptr inbounds i64, i64* %array, i64 %"iv'ac.0"
; CHECK-NEXT: %len_unwrap = load i64, i64* %arrayidx_unwrap, align 8, !tbaa !6, !invariant.group ![[g8]]
; CHECK-NEXT: %len_unwrap = load i64, i64* %arrayidx_unwrap, align 8, !tbaa !6
; CHECK-NEXT: %_unwrap = add i64 %len_unwrap, -1
; CHECK-NEXT: br label %invertfor.body5

Expand Down
16 changes: 8 additions & 8 deletions enzyme/test/Enzyme/ReverseMode/mm.ll
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ attributes #3 = { argmemonly nounwind }
; CHECK: for.body5: ; preds = %for.inc44, %for.cond2.preheader
; CHECK-NEXT: %iv1 = phi i64 [ %iv.next2, %for.inc44 ], [ 0, %for.cond2.preheader ]
; CHECK-NEXT: %iv.next2 = add nuw nsw i64 %iv1, 1
; CHECK-NEXT: %L_lhs_i = load float, float* %lhs_i, align 8, !tbaa !6, !invariant.group ![[lhsiv:[0-9]+]]
; CHECK-NEXT: %L_lhs_i = load float, float* %lhs_i, align 8, !tbaa !6
; CHECK-NEXT: %[[ivrows:.+]] = mul nsw i64 %iv1, %rows
; CHECK-NEXT: %rhs_ij = getelementptr inbounds float, float* %rhs_data, i64 %[[ivrows]]
; CHECK-NEXT: %L_rhs_ij = load float, float* %rhs_ij, align 8, !tbaa !6, !invariant.group ![[rhsiv:[0-9]+]]
; CHECK-NEXT: %L_rhs_ij = load float, float* %rhs_ij, align 8, !tbaa !6
; CHECK-NEXT: %mul = fmul fast float %L_rhs_ij, %L_lhs_i
; CHECK-NEXT: %mul_ext = fpext float %mul to double
; CHECK-NEXT: %[[ivrowsiv:.+]] = add nsw i64 %[[ivrows]], %iv
Expand All @@ -134,10 +134,10 @@ attributes #3 = { argmemonly nounwind }
; CHECK-NEXT: %[[n4rows:.+]] = mul nsw i64 %iv.next4, %rows
; CHECK-NEXT: %[[riv:.+]] = add nsw i64 %[[n4rows]], %iv
; CHECK-NEXT: %lhs_ki = getelementptr inbounds float, float* %lhs_data, i64 %[[riv]]
; CHECK-NEXT: %L_lhs_ki = load float, float* %lhs_ki, align 8, !tbaa !6, !invariant.group !
; CHECK-NEXT: %L_lhs_ki = load float, float* %lhs_ki, align 8, !tbaa !6
; CHECK-NEXT: %[[iv41:.+]] = add nsw i64 %iv.next4, %[[ivrows]]
; CHECK-NEXT: %rhs_kk = getelementptr inbounds float, float* %rhs_data, i64 %[[iv41]]
; CHECK-NEXT: %L_rhs_kk = load float, float* %rhs_kk, align 8, !tbaa !6, !invariant.group !
; CHECK-NEXT: %L_rhs_kk = load float, float* %rhs_kk, align 8, !tbaa !6
; CHECK-NEXT: %mul2 = fmul fast float %L_rhs_kk, %L_lhs_ki
; CHECK-NEXT: %add = fadd fast float %[[fphi]], %mul2
; CHECK-NEXT: %add_ext = fpext float %add to double
Expand Down Expand Up @@ -170,10 +170,10 @@ attributes #3 = { argmemonly nounwind }
; CHECK-NEXT: %[[ptrunc:.+]] = fptrunc double %[[oiji]] to float
; CHECK-NEXT: %[[a10:.+]] = fadd fast float %[[a18:.+]], %[[ptrunc]]
; CHECK-NEXT: %lhs_i_unwrap = getelementptr inbounds float, float* %lhs_data, i64 %"iv'ac.0"
; CHECK-NEXT: %L_lhs_i_unwrap = load float, float* %lhs_i_unwrap, align 8, !tbaa !6, !invariant.group ![[lhsiv]]
; CHECK-NEXT: %L_lhs_i_unwrap = load float, float* %lhs_i_unwrap, align 8, !tbaa !6
; CHECK-NEXT: %m0diffeL_rhs_ij = fmul fast float %[[a10]], %L_lhs_i_unwrap
; CHECK-NEXT: %rhs_ij_unwrap = getelementptr inbounds float, float* %rhs_data, i64 %[[unwrap7:.+]]
; CHECK-NEXT: %L_rhs_ij_unwrap = load float, float* %rhs_ij_unwrap, align 8, !tbaa !6, !invariant.group ![[rhsiv]]
; CHECK-NEXT: %L_rhs_ij_unwrap = load float, float* %rhs_ij_unwrap, align 8, !tbaa !6
; CHECK-NEXT: %m1diffeL_lhs_i = fmul fast float %[[a10]], %L_rhs_ij_unwrap
; CHECK-NEXT: %"rhs_ij'ipg_unwrap" = getelementptr inbounds float, float* %[[drhs_data]], i64 %[[unwrap7]]
; CHECK-NEXT: %[[a11:.+]] = load float, float* %"rhs_ij'ipg_unwrap", align 8
Expand Down Expand Up @@ -203,11 +203,11 @@ attributes #3 = { argmemonly nounwind }
; CHECK-NEXT: %[[unwrap11:.+]] = mul nsw i64 %iv.next4_unwrap, %rows
; CHECK-NEXT: %[[unwrap12:.+]] = add nsw i64 %[[unwrap11]], %"iv'ac.0"
; CHECK-NEXT: %lhs_ki_unwrap = getelementptr inbounds float, float* %lhs_data, i64 %[[unwrap12]]
; CHECK-NEXT: %L_lhs_ki_unwrap = load float, float* %lhs_ki_unwrap, align 8, !tbaa !6, !invariant.group !
; CHECK-NEXT: %L_lhs_ki_unwrap = load float, float* %lhs_ki_unwrap, align 8, !tbaa !6
; CHECK-NEXT: %m0diffeL_rhs_kk = fmul fast float %[[a18]], %L_lhs_ki_unwrap
; CHECK-NEXT: %[[unwrap14:.+]] = add nsw i64 %iv.next4_unwrap, %[[unwrap7]]
; CHECK-NEXT: %rhs_kk_unwrap = getelementptr inbounds float, float* %rhs_data, i64 %[[unwrap14]]
; CHECK-NEXT: %L_rhs_kk_unwrap = load float, float* %rhs_kk_unwrap, align 8, !tbaa !6, !invariant.group !
; CHECK-NEXT: %L_rhs_kk_unwrap = load float, float* %rhs_kk_unwrap, align 8, !tbaa !6
; CHECK-NEXT: %m1diffeL_lhs_ki = fmul fast float %[[a18]], %L_rhs_kk_unwrap
; CHECK-NEXT: %"rhs_kk'ipg_unwrap" = getelementptr inbounds float, float* %[[drhs_data]], i64 %[[unwrap14]]
; CHECK-NEXT: %[[a19:.+]] = load float, float* %"rhs_kk'ipg_unwrap", align 8
Expand Down
Loading

0 comments on commit 65150b8

Please sign in to comment.