[all-commits] [llvm/llvm-project] 1e7d6d: [mlir][vector] Propagate scalability to gather/sca...

Cullen Rhodes via All-commits all-commits at lists.llvm.org
Tue Jul 9 01:06:46 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1e7d6d345518de0738eb5b2eb71addd499fea0fb
      https://github.com/llvm/llvm-project/commit/1e7d6d345518de0738eb5b2eb71addd499fea0fb
  Author: Cullen Rhodes <cullen.rhodes at arm.com>
  Date:   2024-07-09 (Tue, 09 Jul 2024)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.td
    M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
    M mlir/test/Target/LLVMIR/llvmir-invalid.mlir

  Log Message:
  -----------
  [mlir][vector] Propagate scalability to gather/scatter ptrs vector (#97584)

In convert-vector-to-llvm the first operand (vector of pointers holding
all memory addresses to read) to the masked.gather (and scatter)
intrinsic has a fixed vector type.

This may result in intrinsics where the scalable flag has been dropped:
```
  %0 = llvm.intr.masked.gather %1, %2, %3 {alignment = 4 : i32}
    : (!llvm.vec<4 x ptr>, vector<[4]xi1>, vector<[4]xi32>) -> vector<[4]xi32>
```
Fortunately the operand is overloaded on the result type so we end up
with the correct IR when lowering to LLVM, but this is still incorrect.
This patch fixes it by propagating scalability.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list