[llvm] r320980 - [ARM GlobalISel] Fix G_(UN)MERGE_VALUES handling after r319524
Diana Picus via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 18 05:22:28 PST 2017
Author: rovka
Date: Mon Dec 18 05:22:28 2017
New Revision: 320980
URL: http://llvm.org/viewvc/llvm-project?rev=320980&view=rev
Log:
[ARM GlobalISel] Fix G_(UN)MERGE_VALUES handling after r319524
r319524 has made more G_MERGE_VALUES/G_UNMERGE_VALUES pairs legal than
are supported by the rest of the pipeline. Restrict that to only the
cases that we can currently handle: packing 32-bit values into 64-bit
ones, when we have hardware FP.
Modified:
llvm/trunk/lib/Target/ARM/ARMLegalizerInfo.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMLegalizerInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMLegalizerInfo.cpp?rev=320980&r1=320979&r2=320980&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMLegalizerInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMLegalizerInfo.cpp Mon Dec 18 05:22:28 2017
@@ -158,6 +158,11 @@ ARMLegalizerInfo::ARMLegalizerInfo(const
setAction({G_FCMP, s1}, Legal);
setAction({G_FCMP, 1, s32}, Legal);
setAction({G_FCMP, 1, s64}, Legal);
+
+ setAction({G_MERGE_VALUES, s64}, Legal);
+ setAction({G_MERGE_VALUES, 1, s32}, Legal);
+ setAction({G_UNMERGE_VALUES, s32}, Legal);
+ setAction({G_UNMERGE_VALUES, 1, s64}, Legal);
} else {
for (unsigned BinOp : {G_FADD, G_FSUB, G_FMUL, G_FDIV})
for (auto Ty : {s32, s64})
@@ -177,15 +182,6 @@ ARMLegalizerInfo::ARMLegalizerInfo(const
for (auto Ty : {s32, s64})
setAction({Op, Ty}, Libcall);
- // Merge/Unmerge
- for (const auto &Ty : {s32, s64}) {
- setAction({G_MERGE_VALUES, Ty}, Legal);
- setAction({G_UNMERGE_VALUES, 1, Ty}, Legal);
- }
- for (const auto &Ty : {s16, s32}) {
- setAction({G_MERGE_VALUES, 1, Ty}, Legal);
- setAction({G_UNMERGE_VALUES, Ty}, Legal);
- }
computeTables();
}
More information about the llvm-commits
mailing list