HomePhabricator

[Constant] ConstantStruct/Array should not lower poison to undef

Authored by aqjune on Apr 7 2021, 11:20 PM.

Description

[Constant] ConstantStruct/Array should not lower poison to undef

This is a (late) follow-up patch of 8871a4b4cab8a56fd6ff12fd024002c3c79128b3 and
c95f39891a282ebf36199c73b705d4a2c78a46ce to make ConstantStruct::get/ConstantArray::getImpl
correctly return PoisonValue if all elements are poison.
This was found while discussing about the elements of a vector-typed UndefValue (D99853)

Details