Skip to content

Conversation

veera-sivarajan
Copy link
Contributor

Fixes #131273

Adds a check to avoid division when max value of denominator is zero.

@llvmbot
Copy link
Member

llvmbot commented Aug 1, 2025

@llvm/pr-subscribers-mlir-arith

Author: Veera (veera-sivarajan)

Changes

Fixes #131273

Adds a check to avoid division when max value of denominator is zero.


Full diff: https://github.com/llvm/llvm-project/pull/151637.diff

2 Files Affected:

  • (modified) mlir/lib/Interfaces/Utils/InferIntRangeCommon.cpp (+1-2)
  • (modified) mlir/test/Dialect/Arith/int-range-interface.mlir (+9)
diff --git a/mlir/lib/Interfaces/Utils/InferIntRangeCommon.cpp b/mlir/lib/Interfaces/Utils/InferIntRangeCommon.cpp
index 2f47939df5a02..af4ea5ac1cec8 100644
--- a/mlir/lib/Interfaces/Utils/InferIntRangeCommon.cpp
+++ b/mlir/lib/Interfaces/Utils/InferIntRangeCommon.cpp
@@ -290,8 +290,7 @@ static ConstantIntRanges inferDivURange(const ConstantIntRanges &lhs,
                                         DivisionFixupFn fixup) {
   const APInt &lhsMin = lhs.umin(), &lhsMax = lhs.umax(), &rhsMin = rhs.umin(),
               &rhsMax = rhs.umax();
-
-  if (!rhsMin.isZero()) {
+  if (!rhsMin.isZero() && !rhsMax.isZero()) {
     auto udiv = [&fixup](const APInt &a,
                          const APInt &b) -> std::optional<APInt> {
       return fixup(a, b, a.udiv(b));
diff --git a/mlir/test/Dialect/Arith/int-range-interface.mlir b/mlir/test/Dialect/Arith/int-range-interface.mlir
index 2128d36f1a28e..130782ba9f525 100644
--- a/mlir/test/Dialect/Arith/int-range-interface.mlir
+++ b/mlir/test/Dialect/Arith/int-range-interface.mlir
@@ -224,6 +224,15 @@ func.func @ceil_divui(%arg0 : index) -> i1 {
     func.return %7 : i1
 }
 
+// CHECK-LABEL: func @ceil_divui_by_zero_issue_131273
+// CHECK-NEXT: return
+func.func @ceil_divui_by_zero_issue_131273() {
+    %0 = test.with_bounds {smax = 0 : i32, smin = -1 : i32, umax = 0 : i32, umin = -1 : i32} : i32
+    %c7_i32 = arith.constant 7 : i32
+    %1 = arith.ceildivui %c7_i32, %0 : i32
+    return
+}
+
 // CHECK-LABEL: func @ceil_divsi
 // CHECK: %[[ret:.*]] = arith.cmpi eq
 // CHECK: return %[[ret]]

@llvmbot
Copy link
Member

llvmbot commented Aug 1, 2025

@llvm/pr-subscribers-mlir

Author: Veera (veera-sivarajan)

Changes

Fixes #131273

Adds a check to avoid division when max value of denominator is zero.


Full diff: https://github.com/llvm/llvm-project/pull/151637.diff

2 Files Affected:

  • (modified) mlir/lib/Interfaces/Utils/InferIntRangeCommon.cpp (+1-2)
  • (modified) mlir/test/Dialect/Arith/int-range-interface.mlir (+9)
diff --git a/mlir/lib/Interfaces/Utils/InferIntRangeCommon.cpp b/mlir/lib/Interfaces/Utils/InferIntRangeCommon.cpp
index 2f47939df5a02..af4ea5ac1cec8 100644
--- a/mlir/lib/Interfaces/Utils/InferIntRangeCommon.cpp
+++ b/mlir/lib/Interfaces/Utils/InferIntRangeCommon.cpp
@@ -290,8 +290,7 @@ static ConstantIntRanges inferDivURange(const ConstantIntRanges &lhs,
                                         DivisionFixupFn fixup) {
   const APInt &lhsMin = lhs.umin(), &lhsMax = lhs.umax(), &rhsMin = rhs.umin(),
               &rhsMax = rhs.umax();
-
-  if (!rhsMin.isZero()) {
+  if (!rhsMin.isZero() && !rhsMax.isZero()) {
     auto udiv = [&fixup](const APInt &a,
                          const APInt &b) -> std::optional<APInt> {
       return fixup(a, b, a.udiv(b));
diff --git a/mlir/test/Dialect/Arith/int-range-interface.mlir b/mlir/test/Dialect/Arith/int-range-interface.mlir
index 2128d36f1a28e..130782ba9f525 100644
--- a/mlir/test/Dialect/Arith/int-range-interface.mlir
+++ b/mlir/test/Dialect/Arith/int-range-interface.mlir
@@ -224,6 +224,15 @@ func.func @ceil_divui(%arg0 : index) -> i1 {
     func.return %7 : i1
 }
 
+// CHECK-LABEL: func @ceil_divui_by_zero_issue_131273
+// CHECK-NEXT: return
+func.func @ceil_divui_by_zero_issue_131273() {
+    %0 = test.with_bounds {smax = 0 : i32, smin = -1 : i32, umax = 0 : i32, umin = -1 : i32} : i32
+    %c7_i32 = arith.constant 7 : i32
+    %1 = arith.ceildivui %c7_i32, %0 : i32
+    return
+}
+
 // CHECK-LABEL: func @ceil_divsi
 // CHECK: %[[ret:.*]] = arith.cmpi eq
 // CHECK: return %[[ret]]

@veera-sivarajan
Copy link
Contributor Author

ping @krzysz00

@kuhar kuhar requested a review from Hardcode84 August 17, 2025 14:20
@veera-sivarajan veera-sivarajan merged commit e1aa415 into llvm:main Aug 17, 2025
12 checks passed
@veera-sivarajan veera-sivarajan deleted the fix-131273 branch August 17, 2025 18:04
Copy link
Contributor

@krzysz00 krzysz00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm stocking a hold on this because the scenario you're guarding against is a can't happen

// CHECK-LABEL: func @ceil_divui_by_zero_issue_131273
// CHECK-NEXT: return
func.func @ceil_divui_by_zero_issue_131273() {
%0 = test.with_bounds {smax = 0 : i32, smin = -1 : i32, umax = 0 : i32, umin = -1 : i32} : i32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you fix this rest so that umin <=(unsigned) umax?

// CHECK-LABEL: func @ceil_divui_by_zero_issue_131273
// CHECK-NEXT: return
func.func @ceil_divui_by_zero_issue_131273() {
%0 = test.with_bounds {smax = 0 : i32, smin = -1 : i32, umax = 0 : i32, umin = -1 : i32} : i32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you fix this test so that umin <=(unsigned) umax?

&rhsMax = rhs.umax();

if (!rhsMin.isZero()) {
if (!rhsMin.isZero() && !rhsMax.isZero()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition should be strictly redundant - can you debug why you have this case?

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 17, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-aarch64-linux-bootstrap-asan running on sanitizer-buildbot7 while building mlir at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/24/builds/11660

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:522: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:522: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:522: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:522: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:522: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:522: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:522: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/main.py:73: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 86605 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70
FAIL: LLVM :: Other/ChangePrinters/print-changed-diff.ll (63979 of 86605)
******************** TEST 'LLVM :: Other/ChangePrinters/print-changed-diff.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -S -print-changed=diff -passes=instsimplify 2>&1 -o /dev/null < /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll | /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll --check-prefix=CHECK-DIFF-SIMPLE # RUN: at line 6
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -S -print-changed=diff -passes=instsimplify -o /dev/null
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll --check-prefix=CHECK-DIFF-SIMPLE
/home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -S -print-changed=diff -passes=instsimplify -filter-print-funcs=f  2>&1 -o /dev/null < /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll | /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll --check-prefix=CHECK-DIFF-FUNC-FILTER # RUN: at line 10
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -S -print-changed=diff -passes=instsimplify -filter-print-funcs=f -o /dev/null
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll --check-prefix=CHECK-DIFF-FUNC-FILTER
/home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -S -print-changed=diff -passes=instsimplify -print-module-scope 2>&1 -o /dev/null < /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll | /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll --check-prefix=CHECK-DIFF-PRINT-MOD-SCOPE # RUN: at line 14
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -S -print-changed=diff -passes=instsimplify -print-module-scope -o /dev/null
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll --check-prefix=CHECK-DIFF-PRINT-MOD-SCOPE
/home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -S -print-changed=diff -passes=instsimplify -filter-print-funcs="f,g" 2>&1 -o /dev/null < /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll | /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll --check-prefix=CHECK-DIFF-FILTER-MULT-FUNC # RUN: at line 17
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -S -print-changed=diff -passes=instsimplify -filter-print-funcs=f,g -o /dev/null
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll --check-prefix=CHECK-DIFF-FILTER-MULT-FUNC
/home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -S -print-changed=diff -passes="instsimplify,no-op-function" -filter-passes="no-op-function" 2>&1 -o /dev/null < /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll | /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll --check-prefix=CHECK-DIFF-FILTER-PASSES # RUN: at line 20
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -S -print-changed=diff -passes=instsimplify,no-op-function -filter-passes=no-op-function -o /dev/null
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll --check-prefix=CHECK-DIFF-FILTER-PASSES
/home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -S -print-changed=diff -passes="instsimplify,no-op-function" -filter-passes="no-op-function,instsimplify" 2>&1 -o /dev/null < /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll | /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll --check-prefix=CHECK-DIFF-FILTER-MULT-PASSES # RUN: at line 23
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -S -print-changed=diff -passes=instsimplify,no-op-function -filter-passes=no-op-function,instsimplify -o /dev/null
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll --check-prefix=CHECK-DIFF-FILTER-MULT-PASSES
/home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll:227:34: error: CHECK-DIFF-FILTER-MULT-PASSES: expected string not found in input
; CHECK-DIFF-FILTER-MULT-PASSES: *** IR Dump After NoOpFunctionPass on g omitted because no change ***
                                 ^
<stdin>:38:12: note: scanning from here
+ ret i32 5
           ^
<stdin>:53:1: note: possible intended match here
*** IR Dump After NoOpFunctionPass on f omitted because no change ***
^

Input file: <stdin>
Check file: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll

-dump-input=help explains the following input dump.

Step 14 (stage3/asan check) failure: stage3/asan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:522: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:522: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:522: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:522: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:522: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:522: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:522: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/main.py:73: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 86605 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70
FAIL: LLVM :: Other/ChangePrinters/print-changed-diff.ll (63979 of 86605)
******************** TEST 'LLVM :: Other/ChangePrinters/print-changed-diff.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -S -print-changed=diff -passes=instsimplify 2>&1 -o /dev/null < /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll | /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll --check-prefix=CHECK-DIFF-SIMPLE # RUN: at line 6
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -S -print-changed=diff -passes=instsimplify -o /dev/null
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll --check-prefix=CHECK-DIFF-SIMPLE
/home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -S -print-changed=diff -passes=instsimplify -filter-print-funcs=f  2>&1 -o /dev/null < /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll | /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll --check-prefix=CHECK-DIFF-FUNC-FILTER # RUN: at line 10
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -S -print-changed=diff -passes=instsimplify -filter-print-funcs=f -o /dev/null
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll --check-prefix=CHECK-DIFF-FUNC-FILTER
/home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -S -print-changed=diff -passes=instsimplify -print-module-scope 2>&1 -o /dev/null < /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll | /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll --check-prefix=CHECK-DIFF-PRINT-MOD-SCOPE # RUN: at line 14
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -S -print-changed=diff -passes=instsimplify -print-module-scope -o /dev/null
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll --check-prefix=CHECK-DIFF-PRINT-MOD-SCOPE
/home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -S -print-changed=diff -passes=instsimplify -filter-print-funcs="f,g" 2>&1 -o /dev/null < /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll | /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll --check-prefix=CHECK-DIFF-FILTER-MULT-FUNC # RUN: at line 17
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -S -print-changed=diff -passes=instsimplify -filter-print-funcs=f,g -o /dev/null
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll --check-prefix=CHECK-DIFF-FILTER-MULT-FUNC
/home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -S -print-changed=diff -passes="instsimplify,no-op-function" -filter-passes="no-op-function" 2>&1 -o /dev/null < /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll | /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll --check-prefix=CHECK-DIFF-FILTER-PASSES # RUN: at line 20
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -S -print-changed=diff -passes=instsimplify,no-op-function -filter-passes=no-op-function -o /dev/null
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll --check-prefix=CHECK-DIFF-FILTER-PASSES
/home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -S -print-changed=diff -passes="instsimplify,no-op-function" -filter-passes="no-op-function,instsimplify" 2>&1 -o /dev/null < /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll | /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll --check-prefix=CHECK-DIFF-FILTER-MULT-PASSES # RUN: at line 23
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/opt -S -print-changed=diff -passes=instsimplify,no-op-function -filter-passes=no-op-function,instsimplify -o /dev/null
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll --check-prefix=CHECK-DIFF-FILTER-MULT-PASSES
/home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll:227:34: error: CHECK-DIFF-FILTER-MULT-PASSES: expected string not found in input
; CHECK-DIFF-FILTER-MULT-PASSES: *** IR Dump After NoOpFunctionPass on g omitted because no change ***
                                 ^
<stdin>:38:12: note: scanning from here
+ ret i32 5
           ^
<stdin>:53:1: note: possible intended match here
*** IR Dump After NoOpFunctionPass on f omitted because no change ***
^

Input file: <stdin>
Check file: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/Other/ChangePrinters/print-changed-diff.ll

-dump-input=help explains the following input dump.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MLIR] optimization int-range-optimizations crashes

5 participants