We need to ensure that the sign bits of the result all match
so we can't fold to undef.
Similar to PR46585.
Differential D83163
[DAGCombiner] visitSIGN_EXTEND_INREG should fold sext_vector_inreg(undef) to 0 not undef. craig.topper on Jul 4 2020, 12:42 PM. Authored by
Details We need to ensure that the sign bits of the result all match Similar to PR46585.
Diff Detail
Event TimelineComment Actions Would be good to have a test case, but it's obviously broken, yes. ---------------------------------------- Name: zz %r = sext i8 undef to i32 ret i32 %r => %r = i32 undef ret i32 %r ERROR: Value mismatch for i32 %r Example: Source value: #x00000000 (0) [based on undef value] Target value: #x00008000 (32768) |