[all-commits] [llvm/llvm-project] e5a4cf: [mlir] Fix printer when it is a DenseElementsAttr ...

Chengji Yao via All-commits all-commits at lists.llvm.org
Thu May 5 16:57:32 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e5a4cf67431ac6e04d739bb5ff4e5c0c1c19f471
      https://github.com/llvm/llvm-project/commit/e5a4cf67431ac6e04d739bb5ff4e5c0c1c19f471
  Author: Chengji Yao <yaochengji101 at gmail.com>
  Date:   2022-05-05 (Thu, 05 May 2022)

  Changed paths:
    M mlir/lib/IR/BuiltinAttributes.cpp
    A mlir/test/IR/attribute-roundtrip.mlir
    M mlir/test/Target/SPIRV/constant.mlir

  Log Message:
  -----------
  [mlir] Fix printer when it is a DenseElementsAttr of i1

A large DenseElementsAttr of i1could trigger a bug in printer/parser roundtrip.

Ex. A DenseElementsAttr of i1 with 200 elements will print as Hex format of length 400 before the fix. However, when parsing the printed text, an error will be triggered. After fix, the printed length will be 50.

Reviewed By: rriddle

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




More information about the All-commits mailing list