diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp --- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -2600,6 +2600,11 @@ case Intrinsic::objectsize: Users.emplace_back(I); continue; + case Intrinsic::launder_invariant_group: + case Intrinsic::strip_invariant_group: + Users.emplace_back(I); + Worklist.push_back(I); + continue; } } diff --git a/llvm/test/Transforms/InstCombine/malloc-free-delete.ll b/llvm/test/Transforms/InstCombine/malloc-free-delete.ll --- a/llvm/test/Transforms/InstCombine/malloc-free-delete.ll +++ b/llvm/test/Transforms/InstCombine/malloc-free-delete.ll @@ -440,11 +440,6 @@ define void @test17() { ; CHECK-LABEL: @test17( -; CHECK-NEXT: [[NW1:%.*]] = call dereferenceable(32) i8* @_Znwm(i64 32) #[[ATTR10]] -; CHECK-NEXT: [[NW2:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nonnull [[NW1]]) -; CHECK-NEXT: [[TMP1:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* nonnull [[NW1]]) -; CHECK-NEXT: store i8 1, i8* [[TMP1]], align 1 -; CHECK-NEXT: call void @_ZdlPv(i8* [[NW2]]) #[[ATTR10]] ; CHECK-NEXT: ret void ; %nw1 = call i8* @_Znwm(i64 32) builtin