[PATCH] D96953: [SVE] fix IRMover returning wrong modified vector type
    Sander de Smalen via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Feb 18 05:56:38 PST 2021
    
    
  
sdesmalen added a comment.
Hi @nasherm thanks for working on this fix.
================
Comment at: llvm/lib/Linker/IRMover.cpp:301-305
+     return *Entry = ScalableVectorType::get(ElementTypes[0],
+                                             cast<ScalableVectorType>(Ty)->getMinNumElements());
   case Type::FixedVectorTyID:
     return *Entry = FixedVectorType::get(
                ElementTypes[0], cast<FixedVectorType>(Ty)->getNumElements());
----------------
These can both use the same interface to VectorType, e.g.:
  case Type::ScalableVectorTyID:
  case Type::FixedVectorTyID:
    return *Entry = VectorType::get(ElementTypes[0], cast<VectorType>(Ty)->getElementCount());
================
Comment at: llvm/test/Linker/fixed-vector-type-construction.ll:1
+; RUN: true
+%t = type {i32, float}
----------------
I don't think this one needs a RUN line if you move this file to `llvm/test/Linker/Inputs/`
================
Comment at: llvm/test/Linker/sve-type-construction.ll:1
+; RUN: llvm-link %p/fixed-vector-type-construction.ll %p/sve-type-construction.ll -S -o - | FileCheck %s
+%t = type {i32, float}
----------------
Can you replace `sve` with `scalable-vector` (also in the filenames)? The test isn't necessarily specific to SVE.
================
Comment at: llvm/test/Linker/sve-type-construction.ll:1
+; RUN: llvm-link %p/fixed-vector-type-construction.ll %p/sve-type-construction.ll -S -o - | FileCheck %s
+%t = type {i32, float}
----------------
sdesmalen wrote:
> Can you replace `sve` with `scalable-vector` (also in the filenames)? The test isn't necessarily specific to SVE.
This can use `%s` directly.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96953/new/
https://reviews.llvm.org/D96953
    
    
More information about the llvm-commits
mailing list