[PATCH] D88563: [SVE][CodeGen] Replace use of TypeSize comparison operator in CreateStackTemporary
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 21 00:42:30 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5b17b323a617: [SVE][CodeGen] Replace use of TypeSize comparison operator in… (authored by david-arm).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88563/new/
https://reviews.llvm.org/D88563
Files:
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -2045,7 +2045,14 @@
}
SDValue SelectionDAG::CreateStackTemporary(EVT VT1, EVT VT2) {
- TypeSize Bytes = std::max(VT1.getStoreSize(), VT2.getStoreSize());
+ TypeSize VT1Size = VT1.getStoreSize();
+ TypeSize VT2Size = VT2.getStoreSize();
+ assert(VT1Size.isScalable() == VT2Size.isScalable() &&
+ "Don't know how to choose the maximum size when creating a stack "
+ "temporary");
+ TypeSize Bytes =
+ VT1Size.getKnownMinSize() > VT2Size.getKnownMinSize() ? VT1Size : VT2Size;
+
Type *Ty1 = VT1.getTypeForEVT(*getContext());
Type *Ty2 = VT2.getTypeForEVT(*getContext());
const DataLayout &DL = getDataLayout();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88563.299583.patch
Type: text/x-patch
Size: 874 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201021/68f751ee/attachment.bin>
More information about the llvm-commits
mailing list