[PATCH] D96953: [SVE] fix IRMover returning wrong modified vector type
Nashe Mncube via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 22 03:31:56 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0327cfe2f762: [llvm-link] fix IRMover returning wrong modified vector type (authored by nasherm).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96953/new/
https://reviews.llvm.org/D96953
Files:
llvm/lib/Linker/IRMover.cpp
llvm/test/Linker/Inputs/fixed-vector-type-construction.ll
llvm/test/Linker/scalable-vector-type-construction.ll
Index: llvm/test/Linker/scalable-vector-type-construction.ll
===================================================================
--- /dev/null
+++ llvm/test/Linker/scalable-vector-type-construction.ll
@@ -0,0 +1,7 @@
+; RUN: llvm-link %p/Inputs/fixed-vector-type-construction.ll %s -S -o - | FileCheck %s
+%t = type {i32, float}
+; CHECK: define void @foo(<4 x
+; CHECK; define void @bar(<vscale x 4 x
+define void @bar(<vscale x 4 x %t*> %x) {
+ ret void
+}
Index: llvm/test/Linker/Inputs/fixed-vector-type-construction.ll
===================================================================
--- /dev/null
+++ llvm/test/Linker/Inputs/fixed-vector-type-construction.ll
@@ -0,0 +1,4 @@
+%t = type {i32, float}
+define void @foo(<4 x %t*> %x) {
+ ret void
+}
Index: llvm/lib/Linker/IRMover.cpp
===================================================================
--- llvm/lib/Linker/IRMover.cpp
+++ llvm/lib/Linker/IRMover.cpp
@@ -298,10 +298,9 @@
return *Entry = ArrayType::get(ElementTypes[0],
cast<ArrayType>(Ty)->getNumElements());
case Type::ScalableVectorTyID:
- // FIXME: handle scalable vectors
case Type::FixedVectorTyID:
- return *Entry = FixedVectorType::get(
- ElementTypes[0], cast<FixedVectorType>(Ty)->getNumElements());
+ return *Entry = VectorType::get(ElementTypes[0],
+ cast<VectorType>(Ty)->getElementCount());
case Type::PointerTyID:
return *Entry = PointerType::get(ElementTypes[0],
cast<PointerType>(Ty)->getAddressSpace());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96953.325411.patch
Type: text/x-patch
Size: 1597 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210222/a0432d43/attachment.bin>
More information about the llvm-commits
mailing list