Skip to content

Commit 4f6f2ef

Browse files
committed
Revert "Make late gc lower handle insertelement of alloca use. (#58637)"
This reverts commit 47d905d.
1 parent fb73efe commit 4f6f2ef

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

src/llvm-late-gc-lowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,7 @@ void RecursivelyVisit(callback f, Value *V) {
11151115
if (isa<CallInst>(TheUser) || isa<LoadInst>(TheUser) ||
11161116
isa<SelectInst>(TheUser) || isa<PHINode>(TheUser) || // TODO: should these be removed from this list?
11171117
isa<StoreInst>(TheUser) || isa<PtrToIntInst>(TheUser) ||
1118-
isa<ICmpInst>(TheUser) || isa<InsertElementInst>(TheUser)|| // ICmpEQ/ICmpNE can be used with ptr types
1118+
isa<ICmpInst>(TheUser) || // ICmpEQ/ICmpNE can be used with ptr types
11191119
isa<AtomicCmpXchgInst>(TheUser) || isa<AtomicRMWInst>(TheUser))
11201120
continue;
11211121
if (isa<GetElementPtrInst>(TheUser) || isa<BitCastInst>(TheUser) || isa<AddrSpaceCastInst>(TheUser)) {

test/llvmpasses/late-lower-gc.ll

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -226,20 +226,6 @@ define void @decayar([2 x {} addrspace(10)* addrspace(11)*] %ar) {
226226
; OPAQUE: %r = call i32 @callee_root(ptr addrspace(10) %l0, ptr addrspace(10) %l1)
227227
; OPAQUE: call void @julia.pop_gc_frame(ptr %gcframe)
228228

229-
define swiftcc ptr addrspace(10) @insert_element(ptr swiftself %0) {
230-
; CHECK-LABEL: @insert_element
231-
%2 = alloca [10 x i64], i32 1, align 8
232-
; CHECK: %gcframe = call ptr @julia.new_gc_frame(i32 10)
233-
; CHECK: [[gc_slot_addr_:%.*]] = call ptr @julia.get_gc_frame_slot(ptr %gcframe, i32 0)
234-
; CHECK: call void @julia.push_gc_frame(ptr %gcframe, i32 10)
235-
call void null(ptr sret([2 x [5 x ptr addrspace(10)]]) %2, ptr null, ptr addrspace(11) null, ptr null)
236-
%4 = insertelement <4 x ptr> zeroinitializer, ptr %2, i32 0
237-
; CHECK: [[gc_slot_addr_:%.*]] = insertelement <4 x ptr> zeroinitializer, ptr [[gc_slot_addr_:%.*]], i32 0
238-
; CHECK: call void @julia.pop_gc_frame(ptr %gcframe)
239-
ret ptr addrspace(10) null
240-
}
241-
242-
243229
!0 = !{i64 0, i64 23}
244230
!1 = !{!1}
245231
!2 = !{!7} ; scope list

0 commit comments

Comments
 (0)