From 7145d22f81fc9265f63a900ae4bac81d79548390 Mon Sep 17 00:00:00 2001 From: Diana Picus Date: Tue, 27 Jun 2017 09:19:51 +0000 Subject: [ARM] GlobalISel: Support G_SELECT for i32 * Mark as legal for (s32, i1, s32, s32) * Map everything into GPRs * Select to two instructions: a CMP of the condition against 0, to set the flags, and a MOVCCr to select between the two inputs based on the flags that we've just set llvm-svn: 306382 --- llvm/lib/Target/ARM/ARMLegalizerInfo.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/lib/Target/ARM/ARMLegalizerInfo.cpp') diff --git a/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp b/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp index 5873c7fb387..7ec7bab46a9 100644 --- a/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp +++ b/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp @@ -84,6 +84,9 @@ ARMLegalizerInfo::ARMLegalizerInfo(const ARMSubtarget &ST) { setAction({G_GEP, p0}, Legal); setAction({G_GEP, 1, s32}, Legal); + setAction({G_SELECT, s32}, Legal); + setAction({G_SELECT, 1, s1}, Legal); + setAction({G_CONSTANT, s32}, Legal); setAction({G_ICMP, s1}, Legal); -- cgit v1.2.3