Skip to content

Commit cc34663

Browse files
committed
fixup! Update test/llvmpasses/late-lower-gc.ll
1 parent 934af45 commit cc34663

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/llvm-late-gc-lowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1979,7 +1979,7 @@ bool LateLowerGCFrame::CleanupIR(Function &F, State *S, bool *CFGModified) {
19791979
// strip all constant alias information, as it might depend on the gc having
19801980
// preserved a gc root, which stops being true after this pass (#32215)
19811981
// similar to RewriteStatepointsForGC::stripNonValidData, but less aggressive
1982-
if (auto *LI = dyn_cast<Load>(I)){
1982+
if (auto *LI = dyn_cast<LoadInst>(I)){
19831983
if (isSpecialPtr(LI->getPointerOperand()->getType()) && LI->getMetadata(LLVMContext::MD_invariant_load))
19841984
LI->setMetadata(LLVMContext::MD_invariant_load, NULL);
19851985
}

test/llvmpasses/late-lower-gc.ll

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,11 @@ top:
9696
; CHECK-LABEL: @gc_keep_invariant
9797
%pgcstack = call {}*** @julia.get_pgcstack()
9898
%1 = bitcast {}*** %pgcstack to {}**
99-
%current_task = getelementptr inbounds {}*, {}** %0, i64 -12
99+
%current_task = getelementptr inbounds {}*, {}** %1, i64 -12
100100

101-
; CHECK: %current_task = getelementptr inbounds ptr, ptr %0, i64 -12
102-
; CHECK-NEXT: [[ptls_field:%.*]] = getelementptr inbounds i8, ptr %current_task,
103-
; CHECK-NEXT: [[ptls_load:%.*]] = load ptr, ptr [[ptls_field]], align 8, !tbaa !0
104-
%2 = load float, float addrspace(1)* %0, align 4, !invariant.load
105-
; CHECK-NEXT: = load float, float addrspace(1)* %0, align 4, !invariant.load
101+
; CHECK: %current_task = getelementptr inbounds ptr, ptr %1, i64 -12
102+
%2 = load float, ptr addrspace(1) %0, align 4, !invariant.load !1
103+
; CHECK-NEXT: %2 = load float, ptr addrspace(1) %0, align 4, !invariant.load
106104
ret void
107105
}
108106

0 commit comments

Comments
 (0)