Skip to content

Commit 633b42c

Browse files
committed
Do not form poison in zero reduction
1 parent 4cbb8fe commit 633b42c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

llvm/test/tools/llvm-reduce/reduce-operands-target-ext-ty.ll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66

77
declare void @uses_ext_ty(target("sometarget.sometype"))
88

9+
; TODO: Should support reduce to poison
910
; CHECK-LABEL: @foo(
10-
; ZERO: call void @uses_ext_ty(target("sometarget.sometype") poison)
11+
; ZERO: call void @uses_ext_ty(target("sometarget.sometype") %arg)
1112
; ONE: call void @uses_ext_ty(target("sometarget.sometype") %arg)
1213
define void @foo(target("sometarget.sometype") %arg) {
1314
call void @uses_ext_ty(target("sometarget.sometype") %arg)

llvm/tools/llvm-reduce/deltas/ReduceOperands.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ void llvm::reduceOperandsZeroDeltaPass(TestRunner &Test) {
140140
return nullptr;
141141
if (TET->hasProperty(TargetExtType::HasZeroInit))
142142
return ConstantTargetNone::get(TET);
143-
return PoisonValue::get(TET);
143+
144+
// TODO: Poison reduction for this case
145+
return nullptr;
144146
}
145147

146148
// Don't replace existing zeroes.

0 commit comments

Comments
 (0)