[all-commits] [llvm/llvm-project] 3b9165: [mlir][LLVMIR] Add support for translating from so...

Min-Yih Hsu via All-commits all-commits at lists.llvm.org
Fri May 20 21:47:48 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3b91657c7bc1e1fcf3f8374f71c238f432050947
      https://github.com/llvm/llvm-project/commit/3b91657c7bc1e1fcf3f8374f71c238f432050947
  Author: Min-Yih Hsu <minyihh at uci.edu>
  Date:   2022-05-20 (Fri, 20 May 2022)

  Changed paths:
    M mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
    M mlir/test/Target/LLVMIR/Import/basic.ll

  Log Message:
  -----------
  [mlir][LLVMIR] Add support for translating from some simple LLVM instructions

Add support for translating from llvm::Select, llvm::FNeg, and llvm::Unreachable.
This patch also cleans up (NFC) the opcode map for simple instructions and
adds `// clang-format off/on` comments to prevent those lines from being
churned by clang-format between commits.

Differential Revision: https://reviews.llvm.org/D125817


  Commit: f088b99eac74e5ab44fd8a576cd5dc28d7042029
      https://github.com/llvm/llvm-project/commit/f088b99eac74e5ab44fd8a576cd5dc28d7042029
  Author: Min-Yih Hsu <minyihh at uci.edu>
  Date:   2022-05-20 (Fri, 20 May 2022)

  Changed paths:
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    A mlir/test/Target/LLVMIR/Import/incorrect-scalable-vector-check.ll

  Log Message:
  -----------
  [mlir][LLVMIR] Use the correct way to determine if it's a scalable vector

One of the ShuffleVectorOp::build functions checks if the incoming
vector operands is scalable vector by casting its type to
mlir::VectorType first. However, in some cases the operand is not
necessarily mlir::VectorType (e.g. it might be a LLVMVectorType).

This patch fixes this issue by using the dedicated
`LLVM::isScalableVectorType` function to determine if the incoming
vector is scalable vector or not.

Differential Revision: https://reviews.llvm.org/D125818


Compare: https://github.com/llvm/llvm-project/compare/55287840fe3f...f088b99eac74


More information about the All-commits mailing list