summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/GlobalISel/LegalizeMutations.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2019-01-25 00:51:00 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2019-01-25 00:51:00 +0000
commit990f50770423a064cc53fb2d3484f1da10e68a49 (patch)
tree82508dbdaf96e2a2d5dfb8d0a2e41e6526082e00 /llvm/lib/CodeGen/GlobalISel/LegalizeMutations.cpp
parent6710cc7db538774f8dd93cd5b38626af75c99be6 (diff)
downloadbcm5719-llvm-990f50770423a064cc53fb2d3484f1da10e68a49.tar.gz
bcm5719-llvm-990f50770423a064cc53fb2d3484f1da10e68a49.zip
GlobalISel: Add convenience mutatations to scalarize
llvm-svn: 352143
Diffstat (limited to 'llvm/lib/CodeGen/GlobalISel/LegalizeMutations.cpp')
-rw-r--r--llvm/lib/CodeGen/GlobalISel/LegalizeMutations.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/LegalizeMutations.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizeMutations.cpp
index a3954fd62f5..2d5422a0a9f 100644
--- a/llvm/lib/CodeGen/GlobalISel/LegalizeMutations.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/LegalizeMutations.cpp
@@ -48,3 +48,9 @@ LegalizeMutation LegalizeMutations::moreElementsToNextPow2(unsigned TypeIdx,
TypeIdx, LLT::vector(NewNumElements, VecTy.getScalarSizeInBits()));
};
}
+
+LegalizeMutation LegalizeMutations::scalarize(unsigned TypeIdx) {
+ return [=](const LegalityQuery &Query) {
+ return std::make_pair(TypeIdx, Query.Types[TypeIdx].getElementType());
+ };
+}
OpenPOWER on IntegriCloud