[CodeGenPrep] Handle constants in ConvertPhiType
authorDavid Green <david.green@arm.com>
Thu, 13 Oct 2022 15:41:44 +0000 (16:41 +0100)
committerDavid Green <david.green@arm.com>
Thu, 13 Oct 2022 15:41:44 +0000 (16:41 +0100)
commit16e4e4ab878aa148f0a4a56540c96a1725a960a2
tree0bfacb931ab0b495c38b7421f35b470222561471
parentd8cab3f407070c6d80396553ce024e17a0659b04
[CodeGenPrep] Handle constants in ConvertPhiType

This is a simple addition to the convertPhiTypes in CodeGenPrepare to
consider and convert constants as it converts the phi type. Someone
fixed the bug in the motivating example, so the undef is now a constant
0. This does mean converting between integer and floating point
constants, which may have different materialization.

Differential Revision: https://reviews.llvm.org/D135561
llvm/lib/CodeGen/CodeGenPrepare.cpp
llvm/test/CodeGen/AArch64/convertphitype.ll