[all-commits] [llvm/llvm-project] 945157: [mlir] add RemoveConstantIfCondition to populateOp...

Xiang Li via All-commits all-commits at lists.llvm.org
Mon Jan 23 07:12:26 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9451572ade3cc2643290ea70f79cfd6107bc34b1
      https://github.com/llvm/llvm-project/commit/9451572ade3cc2643290ea70f79cfd6107bc34b1
  Author: Xiang Li <python3kgae at outlook.com>
  Date:   2023-01-23 (Mon, 23 Jan 2023)

  Changed paths:
    M mlir/lib/Conversion/OpenACCToSCF/OpenACCToSCF.cpp
    M mlir/test/Conversion/OpenACCToSCF/convert-openacc-to-scf.mlir

  Log Message:
  -----------
  [mlir] add RemoveConstantIfCondition to populateOpenACCToSCFConversionPatterns

Fixes #60058  https://github.com/llvm/llvm-project/issues/60058
It hit assert when legalizePatternResult on success of ExpandIfCondition which did nothing just return success when if condition is constant.

Added RemoveConstantIfCondition to remove the if cond by getCanonicalizationPatterns.
Also remove the check for constant if cond in ExpandIfCondition and
change check ifCond to assert because only op with ifCond will need legalize in ConvertOpenACCToSCFPass

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




More information about the All-commits mailing list