[llvm] [GISEL][RISCV] IRTranslator for scalable vector load (PR #80006)

Jiahan Xie via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 11 12:05:46 PDT 2024


================
@@ -1198,7 +1198,8 @@ void MachineVerifier::verifyPreISelGenericInstruction(const MachineInstr *MI) {
         if (MMO.getSizeInBits() >= ValTy.getSizeInBits())
           report("Generic extload must have a narrower memory type", MI);
       } else if (MI->getOpcode() == TargetOpcode::G_LOAD) {
-        if (MMO.getSize() > ValTy.getSizeInBytes())
+        if (TypeSize::isKnownGT(MMO.getType().getSizeInBytes(),
----------------
jiahanxie353 wrote:

Is it true that verifier tests for this aims to test run-time attributes? I tried to write some tests, such as `load`ing `<vscale x 1 x i16>` into `<vscale x 1 x i8>` but they were all caught as compile-time errors like type mismatch. So it seems like this test requires a clever way to get around, do you have any suggestion?

https://github.com/llvm/llvm-project/pull/80006


More information about the llvm-commits mailing list