Skip to content

Commit 5fc9449

Browse files
committed
[DeadArgElim] Use poison instead of undef as placeholder for dead arguments
It doesn't matter which value we use for dead args, so let's switch to poison, so we can eventually kill undef. Reviewed By: aeubanks, fhahn Differential Revision: https://reviews.llvm.org/D125983
1 parent a49d305 commit 5fc9449

13 files changed

+56
-56
lines changed

clang/test/CodeGen/debug-info-block-vars.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
// CHECK-OPT-NOT: alloca
1414
// Since the block address is not used anywhere in this function,
1515
// the optimizer (DeadArgElim) has replaced all the false uses
16-
// (i.e., metadata users) with undef.
17-
// CHECK-OPT: call void @llvm.dbg.value(metadata i8* undef,
16+
// (i.e., metadata users) with poison.
17+
// CHECK-OPT: call void @llvm.dbg.value(metadata i8* poison,
1818
// CHECK-OPT-SAME: metadata !DIExpression())
1919
void f(void) {
2020
a(^{

clang/test/CodeGen/mips-unsigned-ext-var.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ void foo1(void) {
1717
foo(1,f);
1818
}
1919

20-
//N64: call signext i32 (i32, ...) @foo(i32 signext undef, i32 noundef signext -32)
21-
//N32: call signext i32 (i32, ...) @foo(i32 signext undef, i32 noundef signext -32)
22-
//O32: call i32 (i32, ...) @foo(i32 signext undef, i32 noundef signext -32)
20+
//N64: call signext i32 (i32, ...) @foo(i32 signext poison, i32 noundef signext -32)
21+
//N32: call signext i32 (i32, ...) @foo(i32 signext poison, i32 noundef signext -32)
22+
//O32: call i32 (i32, ...) @foo(i32 signext poison, i32 noundef signext -32)

llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ using namespace llvm;
5454

5555
STATISTIC(NumArgumentsEliminated, "Number of unread args removed");
5656
STATISTIC(NumRetValsEliminated , "Number of unused return values removed");
57-
STATISTIC(NumArgumentsReplacedWithUndef,
58-
"Number of unread args replaced with undef");
57+
STATISTIC(NumArgumentsReplacedWithPoison,
58+
"Number of unread args replaced with poison");
5959

6060
namespace {
6161

@@ -251,14 +251,14 @@ bool DeadArgumentEliminationPass::DeleteDeadVarargs(Function &Fn) {
251251
}
252252

253253
/// RemoveDeadArgumentsFromCallers - Checks if the given function has any
254-
/// arguments that are unused, and changes the caller parameters to be undefined
254+
/// arguments that are unused, and changes the caller parameters to be poison
255255
/// instead.
256256
bool DeadArgumentEliminationPass::RemoveDeadArgumentsFromCallers(Function &Fn) {
257257
// We cannot change the arguments if this TU does not define the function or
258258
// if the linker may choose a function body from another TU, even if the
259259
// nominal linkage indicates that other copies of the function have the same
260260
// semantics. In the below example, the dead load from %p may not have been
261-
// eliminated from the linker-chosen copy of f, so replacing %p with undef
261+
// eliminated from the linker-chosen copy of f, so replacing %p with poison
262262
// in callers may introduce undefined behavior.
263263
//
264264
// define linkonce_odr void @f(i32* %p) {
@@ -294,7 +294,7 @@ bool DeadArgumentEliminationPass::RemoveDeadArgumentsFromCallers(Function &Fn) {
294294
if (!Arg.hasSwiftErrorAttr() && Arg.use_empty() &&
295295
!Arg.hasPassPointeeByValueCopyAttr()) {
296296
if (Arg.isUsedByMetadata()) {
297-
Arg.replaceAllUsesWith(UndefValue::get(Arg.getType()));
297+
Arg.replaceAllUsesWith(PoisonValue::get(Arg.getType()));
298298
Changed = true;
299299
}
300300
UnusedArgs.push_back(Arg.getArgNo());
@@ -311,15 +311,15 @@ bool DeadArgumentEliminationPass::RemoveDeadArgumentsFromCallers(Function &Fn) {
311311
CB->getFunctionType() != Fn.getFunctionType())
312312
continue;
313313

314-
// Now go through all unused args and replace them with "undef".
314+
// Now go through all unused args and replace them with poison.
315315
for (unsigned I = 0, E = UnusedArgs.size(); I != E; ++I) {
316316
unsigned ArgNo = UnusedArgs[I];
317317

318318
Value *Arg = CB->getArgOperand(ArgNo);
319-
CB->setArgOperand(ArgNo, UndefValue::get(Arg->getType()));
319+
CB->setArgOperand(ArgNo, PoisonValue::get(Arg->getType()));
320320
CB->removeParamAttrs(ArgNo, UBImplyingAttributes);
321321

322-
++NumArgumentsReplacedWithUndef;
322+
++NumArgumentsReplacedWithPoison;
323323
Changed = true;
324324
}
325325
}
@@ -964,10 +964,10 @@ bool DeadArgumentEliminationPass::RemoveDeadStuffFromFunction(Function *F) {
964964
CB.replaceAllUsesWith(NewCB);
965965
NewCB->takeName(&CB);
966966
} else if (NewCB->getType()->isVoidTy()) {
967-
// If the return value is dead, replace any uses of it with undef
967+
// If the return value is dead, replace any uses of it with poison
968968
// (any non-debug value uses will get removed later on).
969969
if (!CB.getType()->isX86_MMXTy())
970-
CB.replaceAllUsesWith(UndefValue::get(CB.getType()));
970+
CB.replaceAllUsesWith(PoisonValue::get(CB.getType()));
971971
} else {
972972
assert((RetTy->isStructTy() || RetTy->isArrayTy()) &&
973973
"Return type changed, but not into a void. The old return type"
@@ -983,8 +983,8 @@ bool DeadArgumentEliminationPass::RemoveDeadStuffFromFunction(Function *F) {
983983
// with all the uses, we will just rebuild it using extract/insertvalue
984984
// chaining and let instcombine clean that up.
985985
//
986-
// Start out building up our return value from undef
987-
Value *RetVal = UndefValue::get(RetTy);
986+
// Start out building up our return value from poison
987+
Value *RetVal = PoisonValue::get(RetTy);
988988
for (unsigned Ri = 0; Ri != RetCount; ++Ri)
989989
if (NewRetIdxs[Ri] != -1) {
990990
Value *V;
@@ -1029,10 +1029,10 @@ bool DeadArgumentEliminationPass::RemoveDeadStuffFromFunction(Function *F) {
10291029
I2->takeName(&*I);
10301030
++I2;
10311031
} else {
1032-
// If this argument is dead, replace any uses of it with undef
1032+
// If this argument is dead, replace any uses of it with poison
10331033
// (any non-debug value uses will get removed later on).
10341034
if (!I->getType()->isX86_MMXTy())
1035-
I->replaceAllUsesWith(UndefValue::get(I->getType()));
1035+
I->replaceAllUsesWith(PoisonValue::get(I->getType()));
10361036
}
10371037

10381038
// If we change the return value of the function we must rewrite any return
@@ -1051,8 +1051,8 @@ bool DeadArgumentEliminationPass::RemoveDeadStuffFromFunction(Function *F) {
10511051
// This does generate messy code, but we'll let it to instcombine to
10521052
// clean that up.
10531053
Value *OldRet = RI->getOperand(0);
1054-
// Start out building up our return value from undef
1055-
RetVal = UndefValue::get(NRetTy);
1054+
// Start out building up our return value from poison
1055+
RetVal = PoisonValue::get(NRetTy);
10561056
for (unsigned RetI = 0; RetI != RetCount; ++RetI)
10571057
if (NewRetIdxs[RetI] != -1) {
10581058
Value *EV = IRB.CreateExtractValue(OldRet, RetI, "oldret");
@@ -1117,7 +1117,7 @@ PreservedAnalyses DeadArgumentEliminationPass::run(Module &M,
11171117
Changed |= RemoveDeadStuffFromFunction(&F);
11181118

11191119
// Finally, look for any unused parameters in functions with non-local
1120-
// linkage and replace the passed in parameters with undef.
1120+
// linkage and replace the passed in parameters with poison.
11211121
for (auto &F : M)
11221122
Changed |= RemoveDeadArgumentsFromCallers(F);
11231123

llvm/test/DebugInfo/X86/dbgloc-insert-extract-val-instrs.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55

66
; CHECK-LABEL: fn
77
; CHECK: %oldret = extractvalue { i32, i32, i16 } %z, 0, !dbg ![[LOC:.*]]
8-
; CHECK: %newret = insertvalue { i32, i32 } undef, i32 %oldret, 0, !dbg ![[LOC:.*]]
8+
; CHECK: %newret = insertvalue { i32, i32 } poison, i32 %oldret, 0, !dbg ![[LOC:.*]]
99
; CHECK: %oldret1 = extractvalue { i32, i32, i16 } %z, 1, !dbg ![[LOC:.*]]
1010
; CHECK: %newret2 = insertvalue { i32, i32 } %newret, i32 %oldret1, 1, !dbg ![[LOC:.*]]
1111

1212
; CHECK-LABEL: fn1
1313
; CHECK: %newret = extractvalue { i32, i32 } %ret, 0, !dbg ![[LOC2:.*]]
14-
; CHECK: %oldret = insertvalue { i32, i32, i16 } undef, i32 %newret, 0, !dbg ![[LOC2:.*]]
14+
; CHECK: %oldret = insertvalue { i32, i32, i16 } poison, i32 %newret, 0, !dbg ![[LOC2:.*]]
1515
; CHECK: %newret1 = extractvalue { i32, i32 } %ret, 1, !dbg ![[LOC2:.*]]
1616
; CHECK: %oldret2 = insertvalue { i32, i32, i16 } %oldret, i32 %newret1, 1, !dbg ![[LOC2:.*]]
1717

1818
; ModuleID = 'test.ll'
1919
source_filename = "test.ll"
2020

2121
define internal { i32, i32, i16 } @fn() !dbg !6 {
22-
%x = insertvalue { i32, i32, i16 } undef, i32 1, 0, !dbg !8
22+
%x = insertvalue { i32, i32, i16 } poison, i32 1, 0, !dbg !8
2323
%y = insertvalue { i32, i32, i16 } %x, i32 2, 1, !dbg !9
2424
%z = insertvalue { i32, i32, i16 } %y, i16 3, 2, !dbg !10
2525
ret { i32, i32, i16 } %z, !dbg !11
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; RUN: opt -passes=deadargelim -S < %s | FileCheck %s
22

3-
; If caller is changed to pass in undef, noundef, dereferenceable and other
4-
; attributes that imply immediate undefined behavior should be delete.
3+
; If caller is changed to pass in poison, noundef, dereferenceable and other
4+
; attributes that imply immediate undefined behavior must be deleted.
55
; Other attributes like nonnull, which only imply poison, can be safely kept.
66

77
; CHECK: define i64 @bar(i64* nonnull %0, i64 %1)
@@ -12,7 +12,7 @@ entry:
1212
}
1313

1414
define i64 @foo(i64* %p, i64 %v) {
15-
; CHECK: %retval = call i64 @bar(i64* nonnull undef, i64 %v)
15+
; CHECK: %retval = call i64 @bar(i64* nonnull poison, i64 %v)
1616
%retval = call i64 @bar(i64* nonnull dereferenceable(8) %p, i64 %v)
1717
ret i64 %retval
1818
}

llvm/test/Transforms/DeadArgElim/aggregates.ll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ use_1:
3636
; This use can be classified as applying only to ret 1.
3737
%val0 = extractvalue { i32, i32 } %val, 1
3838
call void @callee(i32 %val0)
39-
ret { i32, i32 } undef
39+
ret { i32, i32 } poison
4040

4141
use_aggregate:
4242
; This use is assumed to apply to both 0 and 1.
@@ -61,7 +61,7 @@ use_1:
6161
; This use can be classified as applying only to ret 1.
6262
%val0 = extractvalue { i32, i32 } %val, 1
6363
call void @callee(i32 %val0)
64-
ret { i32, i32 } undef
64+
ret { i32, i32 } poison
6565

6666
use_aggregate:
6767
; This use is assumed to apply to both 0 and 1.
@@ -77,7 +77,7 @@ declare void @callee(i32)
7777
; CHECK-LABEL: define internal [2 x i32] @array_rets_have_multiple_slots(i32 %in)
7878

7979
define internal [2 x i32] @array_rets_have_multiple_slots(i32 %in) {
80-
%ret = insertvalue [2 x i32] undef, i32 %in, 1
80+
%ret = insertvalue [2 x i32] poison, i32 %in, 1
8181
ret [2 x i32] %ret
8282
}
8383

@@ -91,7 +91,7 @@ define [2 x i32] @test_array_rets_have_multiple_slots() {
9191

9292
; CHECK-LABEL: define internal [2 x i32] @can_shrink_arrays()
9393
; CHECK: [[VAL0:%.*]] = extractvalue [3 x i32] [i32 42, i32 43, i32 44], 0
94-
; CHECK: [[RESTMP:%.*]] = insertvalue [2 x i32] undef, i32 [[VAL0]], 0
94+
; CHECK: [[RESTMP:%.*]] = insertvalue [2 x i32] poison, i32 [[VAL0]], 0
9595
; CHECK: [[VAL2:%.*]] = extractvalue [3 x i32] [i32 42, i32 43, i32 44], 2
9696
; CHECK: [[RES:%.*]] = insertvalue [2 x i32] [[RESTMP]], i32 [[VAL2]], 1
9797
; CHECK: ret [2 x i32] [[RES]]
@@ -168,9 +168,9 @@ entry:
168168

169169
; CHECK-LABEL: define void @PR24906
170170
; CHECK: %[[invoke:.*]] = invoke i32 @agg_ret()
171-
; CHECK: %[[oldret:.*]] = insertvalue { i32 } undef, i32 %[[invoke]], 0
171+
; CHECK: %[[oldret:.*]] = insertvalue { i32 } poison, i32 %[[invoke]], 0
172172
; CHECK: phi { i32 } [ %[[oldret]],
173-
define void @PR24906() personality i32 (i32)* undef {
173+
define void @PR24906() personality i32 (i32)* poison {
174174
entry:
175175
%tmp2 = invoke { i32 } @agg_ret()
176176
to label %bb3 unwind label %bb4

llvm/test/Transforms/DeadArgElim/byref.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ define void @unused_byref_arg(i32* byref(i32) %dead_arg) {
1212
ret void
1313
}
1414

15-
define void @dont_replace_by_undef(i32* %ptr) {
16-
; CHECK-LABEL: @dont_replace_by_undef(
17-
; CHECK-NEXT: call void @unused_byref_arg(i32* byref(i32) undef)
15+
define void @dont_replace_by_poison(i32* %ptr) {
16+
; CHECK-LABEL: @dont_replace_by_poison(
17+
; CHECK-NEXT: call void @unused_byref_arg(i32* byref(i32) poison)
1818
; CHECK-NEXT: ret void
1919
;
2020
call void @unused_byref_arg(i32* byref(i32) %ptr)

llvm/test/Transforms/DeadArgElim/dbginfo-update-dbgval-local.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
; RUN: opt -passes=deadargelim -S < %s | FileCheck %s
22

33
; Verify that the dbg.value intrinsics that use the dead argument and return
4-
; value are marked as undef to indicate that the values are optimized out.
4+
; value are marked as poison to indicate that the values are optimized out.
55

66
; Reproducer for PR23260.
77

88
; CHECK-LABEL: define internal void @bar()
9-
; CHECK: call void @llvm.dbg.value(metadata i32 undef, metadata ![[LOCAL1:[0-9]+]]
9+
; CHECK: call void @llvm.dbg.value(metadata i32 poison, metadata ![[LOCAL1:[0-9]+]]
1010
; CHECK: call void @sink()
1111

1212
; Function Attrs: alwaysinline nounwind uwtable
@@ -19,7 +19,7 @@ entry:
1919

2020
; CHECK-LABEL: define void @foo()
2121
; CHECK: call void @bar()
22-
; CHECK: call void @llvm.dbg.value(metadata i32 undef, metadata ![[LOCAL2:[0-9]+]]
22+
; CHECK: call void @llvm.dbg.value(metadata i32 poison, metadata ![[LOCAL2:[0-9]+]]
2323
; CHECK: call void @bar()
2424

2525
; Function Attrs: nounwind uwtable

llvm/test/Transforms/DeadArgElim/dbginfo-update-dbgval.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
2424
; Function Attrs: noinline nounwind uwtable
2525
define dso_local void @f2(i32 %k) local_unnamed_addr !dbg !11 {
2626
entry:
27-
; CHECK: call void @llvm.dbg.value(metadata i32 undef, metadata !15, metadata !DIExpression()), !dbg !16
27+
; CHECK: call void @llvm.dbg.value(metadata i32 poison, metadata !15, metadata !DIExpression()), !dbg !16
2828
call void @llvm.dbg.value(metadata i32 %k, metadata !15, metadata !DIExpression()), !dbg !16
2929
%0 = load i32, i32* @s, align 4, !dbg !17
3030
%inc = add nsw i32 %0, 1, !dbg !17
@@ -36,7 +36,7 @@ entry:
3636
; Function Attrs: noinline nounwind uwtable
3737
define dso_local void @f() local_unnamed_addr !dbg !19 {
3838
entry:
39-
; CHECK: tail call void @f2(i32 undef), !dbg !22
39+
; CHECK: tail call void @f2(i32 poison), !dbg !22
4040
tail call void @f2(i32 4), !dbg !22
4141
ret void, !dbg !23
4242
}

llvm/test/Transforms/DeadArgElim/deadexternal.ll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ define void @foo() {
88
call void @test(i32 0)
99
ret void
1010
; CHECK-LABEL: @foo(
11-
; CHECK: i32 undef
11+
; CHECK: i32 poison
1212
}
1313

1414
define void @f(i32 %X) {
@@ -22,7 +22,7 @@ declare void @sideeffect()
2222
define void @g(i32 %n) {
2323
entry:
2424
%add = add nsw i32 %n, 1
25-
; CHECK: tail call void @f(i32 undef)
25+
; CHECK: tail call void @f(i32 poison)
2626
tail call void @f(i32 %add)
2727
ret void
2828
}
@@ -32,7 +32,7 @@ entry:
3232
%i = alloca i32, align 4
3333
store volatile i32 10, i32* %i, align 4
3434
; CHECK: %tmp = load volatile i32, i32* %i, align 4
35-
; CHECK-NEXT: call void @f(i32 undef)
35+
; CHECK-NEXT: call void @f(i32 poison)
3636
%tmp = load volatile i32, i32* %i, align 4
3737
call void @f(i32 %tmp)
3838
ret void
@@ -57,9 +57,9 @@ define void @unused_swifterror_arg(%swift_error** swifterror %dead_arg) {
5757
ret void
5858
}
5959

60-
; CHECK-LABEL: @dont_replace_by_undef
61-
; CHECK-NOT: call void @unused_swifterror_arg({{.*}}undef)
62-
define void @dont_replace_by_undef() {
60+
; CHECK-LABEL: @dont_replace_by_poison
61+
; CHECK-NOT: call void @unused_swifterror_arg({{.*}}poison)
62+
define void @dont_replace_by_poison() {
6363
%error_ptr_ref = alloca swifterror %swift_error*
6464
store %swift_error* null, %swift_error** %error_ptr_ref
6565
call void @unused_swifterror_arg(%swift_error** %error_ptr_ref)

llvm/test/Transforms/DeadArgElim/fct_ptr.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55
; Because of that use, we used to bail out on removing the
66
; unused arguments for this function.
77
; Yet, we should still be able to rewrite the direct calls that are
8-
; statically known, by replacing the related arguments with undef.
8+
; statically known, by replacing the related arguments with poison.
99
; This is what we check on the call that produces %res2.
1010

1111
define i32 @call_indirect(i32 (i32, i32, i32)* readnone %fct_ptr, i32 %arg1, i32 %arg2, i32 %arg3) {
1212
; CHECK-LABEL: @call_indirect(
1313
; CHECK-NEXT: [[CMP0:%.*]] = icmp eq i32 (i32, i32, i32)* [[FCT_PTR:%.*]], @external_fct
1414
; CHECK-NEXT: br i1 [[CMP0]], label [[CALL_EXT:%.*]], label [[CHK2:%.*]]
1515
; CHECK: call_ext:
16-
; CHECK-NEXT: [[RES1:%.*]] = tail call i32 @external_fct(i32 undef, i32 [[ARG2:%.*]], i32 undef)
16+
; CHECK-NEXT: [[RES1:%.*]] = tail call i32 @external_fct(i32 poison, i32 [[ARG2:%.*]], i32 poison)
1717
; CHECK-NEXT: br label [[END:%.*]]
1818
; CHECK: chk2:
1919
; CHECK-NEXT: [[CMP1:%.*]] = icmp eq i32 (i32, i32, i32)* [[FCT_PTR]], @internal_fct
2020
; CHECK-NEXT: br i1 [[CMP1]], label [[CALL_INT:%.*]], label [[CALL_OTHER:%.*]]
2121
; CHECK: call_int:
22-
; CHECK-NEXT: [[RES2:%.*]] = tail call i32 @internal_fct(i32 undef, i32 [[ARG2]], i32 undef)
22+
; CHECK-NEXT: [[RES2:%.*]] = tail call i32 @internal_fct(i32 poison, i32 [[ARG2]], i32 poison)
2323
; CHECK-NEXT: br label [[END]]
2424
; CHECK: call_other:
2525
; CHECK-NEXT: [[RES3:%.*]] = tail call i32 @other_fct(i32 [[ARG2]])

llvm/test/Transforms/DeadArgElim/opaque-ptr.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ define void @callee(i32 %unused) {
1111

1212
define void @caller() {
1313
; CHECK-LABEL: define {{[^@]+}}@caller() {
14-
; CHECK-NEXT: call void @callee(i32 undef)
14+
; CHECK-NEXT: call void @callee(i32 poison)
1515
; CHECK-NEXT: call void @callee()
1616
; CHECK-NEXT: call void @callee(i32 42, i32 24)
1717
; CHECK-NEXT: ret void

llvm/test/Transforms/DeadArgElim/variadic_safety.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ define internal i32 @va_func(i32 %a, i32 %b, ...) {
1717
define i32 @call_va(i32 %in) {
1818
%stacked = alloca i32
1919
store i32 42, i32* %stacked
20-
%res = call i32(i32, i32, ...) @va_func(i32 %in, i32 %in, [6 x i32] undef, i32* byval(i32) %stacked)
20+
%res = call i32(i32, i32, ...) @va_func(i32 %in, i32 %in, [6 x i32] poison, i32* byval(i32) %stacked)
2121
ret i32 %res
22-
; CHECK: call i32 (i32, i32, ...) @va_func(i32 undef, i32 %in, [6 x i32] undef, i32* byval(i32) %stacked)
22+
; CHECK: call i32 (i32, i32, ...) @va_func(i32 poison, i32 %in, [6 x i32] poison, i32* byval(i32) %stacked)
2323
}
2424

2525
define internal i32 @va_deadret_func(i32 %a, i32 %b, ...) {
@@ -32,7 +32,7 @@ define internal i32 @va_deadret_func(i32 %a, i32 %b, ...) {
3232
define void @call_deadret(i32 %in) {
3333
%stacked = alloca i32
3434
store i32 42, i32* %stacked
35-
call i32 (i32, i32, ...) @va_deadret_func(i32 undef, i32 %in, [6 x i32] undef, i32* byval(i32) %stacked)
35+
call i32 (i32, i32, ...) @va_deadret_func(i32 poison, i32 %in, [6 x i32] poison, i32* byval(i32) %stacked)
3636
ret void
37-
; CHECK: call void (i32, i32, ...) @va_deadret_func(i32 undef, i32 undef, [6 x i32] undef, i32* byval(i32) %stacked)
37+
; CHECK: call void (i32, i32, ...) @va_deadret_func(i32 poison, i32 poison, [6 x i32] poison, i32* byval(i32) %stacked)
3838
}

0 commit comments

Comments
 (0)