From c768bbe2e7b63bc8928b9ed0e27f1356ab8bbf22 Mon Sep 17 00:00:00 2001 From: Diana Picus Date: Thu, 4 Jan 2018 13:09:14 +0000 Subject: [ARM GlobalISel] Legalize scalar G_PHI Mark G_PHI as Legal for s32 and p0, and also for s64 if we have hard float. Widen any smaller types. llvm-svn: 321795 --- llvm/lib/Target/ARM/ARMLegalizerInfo.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'llvm/lib') diff --git a/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp b/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp index 8cff1f0869d..569e61aae29 100644 --- a/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp +++ b/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp @@ -144,6 +144,11 @@ ARMLegalizerInfo::ARMLegalizerInfo(const ARMSubtarget &ST) { setAction({G_BRCOND, s1}, Legal); + for (auto Ty : {s32, p0}) + setAction({G_PHI, Ty}, Legal); + setLegalizeScalarToDifferentSizeStrategy( + G_PHI, 0, widenToLargerTypesUnsupportedOtherwise); + setAction({G_CONSTANT, s32}, Legal); setAction({G_CONSTANT, p0}, Legal); setLegalizeScalarToDifferentSizeStrategy(G_CONSTANT, 0, widen_1_8_16); @@ -162,6 +167,8 @@ ARMLegalizerInfo::ARMLegalizerInfo(const ARMSubtarget &ST) { setAction({G_LOAD, s64}, Legal); setAction({G_STORE, s64}, Legal); + setAction({G_PHI, s64}, Legal); + setAction({G_FCMP, s1}, Legal); setAction({G_FCMP, 1, s32}, Legal); setAction({G_FCMP, 1, s64}, Legal); -- cgit v1.2.3