diff options
author | Eli Friedman <efriedma@quicinc.com> | 2020-01-13 15:32:45 -0800 |
---|---|---|
committer | Eli Friedman <efriedma@quicinc.com> | 2020-01-13 16:55:41 -0800 |
commit | e68e4cbcc50ba7ab8df5e09023f15e6cc2223bef (patch) | |
tree | c060df72c78b35ee0942dac9e9408add9fb55168 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | 989bed989a41732d1b70314bd9063ccd6e74fe5c (diff) | |
download | bcm5719-llvm-e68e4cbcc50ba7ab8df5e09023f15e6cc2223bef.tar.gz bcm5719-llvm-e68e4cbcc50ba7ab8df5e09023f15e6cc2223bef.zip |
[GlobalISel] Change representation of shuffle masks in MachineOperand.
We're planning to remove the shufflemask operand from ShuffleVectorInst
(D72467); fix GlobalISel so it doesn't depend on that Constant.
The change to prelegalizercombiner-shuffle-vector.mir happens because
the input contains a literal "-1" in the mask (so the parser/verifier
weren't really handling it properly). We now treat it as equivalent to
"undef" in all contexts.
Differential Revision: https://reviews.llvm.org/D72663
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index b147a83cd16..4612690644f 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -484,6 +484,12 @@ uint32_t *MachineFunction::allocateRegMask() { return Mask; } +ArrayRef<int> MachineFunction::allocateShuffleMask(ArrayRef<int> Mask) { + int* AllocMask = Allocator.Allocate<int>(Mask.size()); + copy(Mask, AllocMask); + return {AllocMask, Mask.size()}; +} + #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) LLVM_DUMP_METHOD void MachineFunction::dump() const { print(dbgs()); |