Skip to content

Commit f7f947e

Browse files
committed
[InstCombine] Remove some uninteresting FIXMEs (NFC)
If there are two undef operands, the select would get folded away entirely. One undef operand can occur if the other two operands do not satisfy the poison implication check. However, I don't think that handling this edge case is worthwhile in this fold. If we wanted to handle this, it would be more natural to do so in the simplifyValueKnownNonZero() fold (as this is actually the property we would be exploiting -- this doesn't really have any relation to taking the log2).
1 parent f93aa51 commit f7f947e

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,9 +1299,6 @@ static Value *takeLog2(IRBuilderBase &Builder, Value *Op, unsigned Depth,
12991299
}
13001300

13011301
// log2(Cond ? X : Y) -> Cond ? log2(X) : log2(Y)
1302-
// FIXME: missed optimization: if one of the hands of select is/contains
1303-
// undef, just directly pick the other one.
1304-
// FIXME: can both hands contain undef?
13051302
// FIXME: Require one use?
13061303
if (SelectInst *SI = dyn_cast<SelectInst>(Op))
13071304
if (Value *LogX = takeLog2(Builder, SI->getOperand(1), Depth,

0 commit comments

Comments
 (0)