summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
diff options
context:
space:
mode:
authorDiana Picus <diana.picus@linaro.org>2017-06-27 09:19:51 +0000
committerDiana Picus <diana.picus@linaro.org>2017-06-27 09:19:51 +0000
commit7145d22f81fc9265f63a900ae4bac81d79548390 (patch)
treeef2deace972b4e64268b1c5b2f1dcf3d07a6be4d /llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
parentfc1e210d4464ff172a35ed73ddf0e107ffe6bc5e (diff)
downloadbcm5719-llvm-7145d22f81fc9265f63a900ae4bac81d79548390.tar.gz
bcm5719-llvm-7145d22f81fc9265f63a900ae4bac81d79548390.zip
[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
Diffstat (limited to 'llvm/lib/Target/ARM/ARMLegalizerInfo.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMLegalizerInfo.cpp3
1 files changed, 3 insertions, 0 deletions
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);
OpenPOWER on IntegriCloud