Skip to content

[mlir] IntegerRangeAnalysis: return initialized state for noninteger values #133541

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2025

Conversation

Mogball
Copy link
Contributor

@Mogball Mogball commented Mar 28, 2025

Otherwise, the state for noninteger values remains uninitialized, causing the analysis to return bogus results.

…oninteger values

Otherwise, the state for noninteger values remains uninitialized,
causing the analysis to return bogus results.
@Mogball Mogball changed the title [mlir][analysis] IntegerRangeAnalysis: return initialized state for n… [mlir] IntegerRangeAnalysis: return initialized state for noninteger values Mar 28, 2025
@Mogball Mogball merged commit 5252bb1 into main Mar 28, 2025
9 of 13 checks passed
@Mogball Mogball deleted the users/mogball/int_range branch March 28, 2025 23:13
@llvmbot
Copy link
Member

llvmbot commented Mar 28, 2025

@llvm/pr-subscribers-mlir-arith

Author: Jeff Niu (Mogball)

Changes

Otherwise, the state for noninteger values remains uninitialized, causing the analysis to return bogus results.


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

2 Files Affected:

  • (modified) mlir/lib/Interfaces/InferIntRangeInterface.cpp (-3)
  • (modified) mlir/test/Dialect/Arith/int-range-interface.mlir (+17-1)
diff --git a/mlir/lib/Interfaces/InferIntRangeInterface.cpp b/mlir/lib/Interfaces/InferIntRangeInterface.cpp
index 1801e3f7c52fd..9f3e97d051c85 100644
--- a/mlir/lib/Interfaces/InferIntRangeInterface.cpp
+++ b/mlir/lib/Interfaces/InferIntRangeInterface.cpp
@@ -134,9 +134,6 @@ raw_ostream &mlir::operator<<(raw_ostream &os, const ConstantIntRanges &range) {
 
 IntegerValueRange IntegerValueRange::getMaxRange(Value value) {
   unsigned width = ConstantIntRanges::getStorageBitwidth(value.getType());
-  if (width == 0)
-    return {};
-
   APInt umin = APInt::getMinValue(width);
   APInt umax = APInt::getMaxValue(width);
   APInt smin = width != 0 ? APInt::getSignedMinValue(width) : umin;
diff --git a/mlir/test/Dialect/Arith/int-range-interface.mlir b/mlir/test/Dialect/Arith/int-range-interface.mlir
index 090af3e79f4a1..e729397a5b512 100644
--- a/mlir/test/Dialect/Arith/int-range-interface.mlir
+++ b/mlir/test/Dialect/Arith/int-range-interface.mlir
@@ -1,4 +1,4 @@
-// RUN: mlir-opt -int-range-optimizations -canonicalize %s | FileCheck %s
+// RUN: mlir-opt -allow-unregistered-dialect -int-range-optimizations -canonicalize %s | FileCheck %s
 
 // CHECK-LABEL: func @add_min_max
 // CHECK: %[[c3:.*]] = arith.constant 3 : index
@@ -1013,3 +1013,19 @@ func.func @zero_trip_loop2() {
   }
   return
 }
+
+// CHECK-LABEL: @noninteger_operation_result
+func.func @noninteger_operation_result(%lb: index, %ub: index, %step: index, %cond: i1) {
+  %c1_i32 = arith.constant 1 : i32
+
+  %0 = "some_fp_op"() : () -> f32
+  // CHECK: [[OUTS:%.*]]:2 = scf.for
+  %outs:2 = scf.for %i = %lb to %ub step %step iter_args(%a = %c1_i32, %b = %0) -> (i32, f32) {
+    %1 = "some_int_op"() : () -> i32
+    scf.yield %1, %0 : i32, f32
+  }
+
+  %result = arith.select %cond, %c1_i32, %outs#0 : i32
+  "use"(%result) : (i32) -> ()
+  return
+}

@llvmbot
Copy link
Member

llvmbot commented Mar 28, 2025

@llvm/pr-subscribers-mlir

Author: Jeff Niu (Mogball)

Changes

Otherwise, the state for noninteger values remains uninitialized, causing the analysis to return bogus results.


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

2 Files Affected:

  • (modified) mlir/lib/Interfaces/InferIntRangeInterface.cpp (-3)
  • (modified) mlir/test/Dialect/Arith/int-range-interface.mlir (+17-1)
diff --git a/mlir/lib/Interfaces/InferIntRangeInterface.cpp b/mlir/lib/Interfaces/InferIntRangeInterface.cpp
index 1801e3f7c52fd..9f3e97d051c85 100644
--- a/mlir/lib/Interfaces/InferIntRangeInterface.cpp
+++ b/mlir/lib/Interfaces/InferIntRangeInterface.cpp
@@ -134,9 +134,6 @@ raw_ostream &mlir::operator<<(raw_ostream &os, const ConstantIntRanges &range) {
 
 IntegerValueRange IntegerValueRange::getMaxRange(Value value) {
   unsigned width = ConstantIntRanges::getStorageBitwidth(value.getType());
-  if (width == 0)
-    return {};
-
   APInt umin = APInt::getMinValue(width);
   APInt umax = APInt::getMaxValue(width);
   APInt smin = width != 0 ? APInt::getSignedMinValue(width) : umin;
diff --git a/mlir/test/Dialect/Arith/int-range-interface.mlir b/mlir/test/Dialect/Arith/int-range-interface.mlir
index 090af3e79f4a1..e729397a5b512 100644
--- a/mlir/test/Dialect/Arith/int-range-interface.mlir
+++ b/mlir/test/Dialect/Arith/int-range-interface.mlir
@@ -1,4 +1,4 @@
-// RUN: mlir-opt -int-range-optimizations -canonicalize %s | FileCheck %s
+// RUN: mlir-opt -allow-unregistered-dialect -int-range-optimizations -canonicalize %s | FileCheck %s
 
 // CHECK-LABEL: func @add_min_max
 // CHECK: %[[c3:.*]] = arith.constant 3 : index
@@ -1013,3 +1013,19 @@ func.func @zero_trip_loop2() {
   }
   return
 }
+
+// CHECK-LABEL: @noninteger_operation_result
+func.func @noninteger_operation_result(%lb: index, %ub: index, %step: index, %cond: i1) {
+  %c1_i32 = arith.constant 1 : i32
+
+  %0 = "some_fp_op"() : () -> f32
+  // CHECK: [[OUTS:%.*]]:2 = scf.for
+  %outs:2 = scf.for %i = %lb to %ub step %step iter_args(%a = %c1_i32, %b = %0) -> (i32, f32) {
+    %1 = "some_int_op"() : () -> i32
+    scf.yield %1, %0 : i32, f32
+  }
+
+  %result = arith.select %cond, %c1_i32, %outs#0 : i32
+  "use"(%result) : (i32) -> ()
+  return
+}

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 28, 2025

LLVM Buildbot has detected a new failure on builder mlir-s390x-linux running on systemz-1 while building mlir at step 6 "test-build-unified-tree-check-mlir".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-mlir) failure: test (failure)
******************** TEST 'MLIR :: Dialect/Arith/int-range-interface.mlir' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt -allow-unregistered-dialect -int-range-optimizations -canonicalize /home/uweigand/sandbox/buildbot/mlir-s390x-linux/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir | /home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/FileCheck /home/uweigand/sandbox/buildbot/mlir-s390x-linux/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir
# executed command: /home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/mlir-opt -allow-unregistered-dialect -int-range-optimizations -canonicalize /home/uweigand/sandbox/buildbot/mlir-s390x-linux/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir
# executed command: /home/uweigand/sandbox/buildbot/mlir-s390x-linux/build/bin/FileCheck /home/uweigand/sandbox/buildbot/mlir-s390x-linux/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir
# .---command stderr------------
# | /home/uweigand/sandbox/buildbot/mlir-s390x-linux/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir:1022:12: error: CHECK: expected string not found in input
# |  // CHECK: [[OUTS:%.*]]:2 = scf.for
# |            ^
# | <stdin>:439:40: note: scanning from here
# |  func.func @noninteger_operation_result(%arg0: index, %arg1: index, %arg2: index, %arg3: i1) {
# |                                        ^
# | <stdin>:440:2: note: possible intended match here
# |  %c1_i32 = arith.constant 1 : i32
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/uweigand/sandbox/buildbot/mlir-s390x-linux/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |               .
# |               .
# |               .
# |             434:  return 
# |             435:  } 
# |             436:  func.func @zero_trip_loop2() { 
# |             437:  return 
# |             438:  } 
# |             439:  func.func @noninteger_operation_result(%arg0: index, %arg1: index, %arg2: index, %arg3: i1) { 
# | check:1022'0                                            X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# |             440:  %c1_i32 = arith.constant 1 : i32 
# | check:1022'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:1022'1      ?                                 possible intended match
# |             441:  %0 = "some_fp_op"() : () -> f32 
# | check:1022'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             442:  %1 = scf.for %arg4 = %arg0 to %arg1 step %arg2 iter_args(%arg5 = %c1_i32) -> (i32) { 
# | check:1022'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             443:  %3 = "some_int_op"() : () -> i32 
# | check:1022'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             444:  scf.yield %3 : i32 
# | check:1022'0     ~~~~~~~~~~~~~~~~~~~~
# |             445:  } 
# | check:1022'0     ~~~
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 28, 2025

LLVM Buildbot has detected a new failure on builder mlir-rocm-mi200 running on mi200-buildbot while building mlir at step 7 "test-build-check-mlir-build-only-check-mlir".

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

Here is the relevant piece of the build log for the reference
Step 7 (test-build-check-mlir-build-only-check-mlir) failure: test (failure)
******************** TEST 'MLIR :: Dialect/Arith/int-range-interface.mlir' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/mlir-opt -allow-unregistered-dialect -int-range-optimizations -canonicalize /vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir | /vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/FileCheck /vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir
# executed command: /vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/mlir-opt -allow-unregistered-dialect -int-range-optimizations -canonicalize /vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir
# executed command: /vol/worker/mi200-buildbot/mlir-rocm-mi200/build/bin/FileCheck /vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir
# .---command stderr------------
# | /vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir:1022:12: error: CHECK: expected string not found in input
# |  // CHECK: [[OUTS:%.*]]:2 = scf.for
# |            ^
# | <stdin>:439:40: note: scanning from here
# |  func.func @noninteger_operation_result(%arg0: index, %arg1: index, %arg2: index, %arg3: i1) {
# |                                        ^
# | <stdin>:440:2: note: possible intended match here
# |  %c1_i32 = arith.constant 1 : i32
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |               .
# |               .
# |               .
# |             434:  return 
# |             435:  } 
# |             436:  func.func @zero_trip_loop2() { 
# |             437:  return 
# |             438:  } 
# |             439:  func.func @noninteger_operation_result(%arg0: index, %arg1: index, %arg2: index, %arg3: i1) { 
# | check:1022'0                                            X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# |             440:  %c1_i32 = arith.constant 1 : i32 
# | check:1022'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:1022'1      ?                                 possible intended match
# |             441:  %0 = "some_fp_op"() : () -> f32 
# | check:1022'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             442:  %1 = scf.for %arg4 = %arg0 to %arg1 step %arg2 iter_args(%arg5 = %c1_i32) -> (i32) { 
# | check:1022'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             443:  %3 = "some_int_op"() : () -> i32 
# | check:1022'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             444:  scf.yield %3 : i32 
# | check:1022'0     ~~~~~~~~~~~~~~~~~~~~
# |             445:  } 
# | check:1022'0     ~~~
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 28, 2025

LLVM Buildbot has detected a new failure on builder mlir-nvidia running on mlir-nvidia while building mlir at step 7 "test-build-check-mlir-build-only-check-mlir".

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

Here is the relevant piece of the build log for the reference
Step 7 (test-build-check-mlir-build-only-check-mlir) failure: test (failure)
******************** TEST 'MLIR :: Dialect/Arith/int-range-interface.mlir' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/bin/mlir-opt -allow-unregistered-dialect -int-range-optimizations -canonicalize /vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/test/Dialect/Arith/int-range-interface.mlir | /vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/bin/FileCheck /vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/test/Dialect/Arith/int-range-interface.mlir
# executed command: /vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/bin/mlir-opt -allow-unregistered-dialect -int-range-optimizations -canonicalize /vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/test/Dialect/Arith/int-range-interface.mlir
# executed command: /vol/worker/mlir-nvidia/mlir-nvidia/llvm.obj/bin/FileCheck /vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/test/Dialect/Arith/int-range-interface.mlir
# .---command stderr------------
# | /vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/test/Dialect/Arith/int-range-interface.mlir:1022:12: error: CHECK: expected string not found in input
# |  // CHECK: [[OUTS:%.*]]:2 = scf.for
# |            ^
# | <stdin>:439:40: note: scanning from here
# |  func.func @noninteger_operation_result(%arg0: index, %arg1: index, %arg2: index, %arg3: i1) {
# |                                        ^
# | <stdin>:440:2: note: possible intended match here
# |  %c1_i32 = arith.constant 1 : i32
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /vol/worker/mlir-nvidia/mlir-nvidia/llvm.src/mlir/test/Dialect/Arith/int-range-interface.mlir
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |               .
# |               .
# |               .
# |             434:  return 
# |             435:  } 
# |             436:  func.func @zero_trip_loop2() { 
# |             437:  return 
# |             438:  } 
# |             439:  func.func @noninteger_operation_result(%arg0: index, %arg1: index, %arg2: index, %arg3: i1) { 
# | check:1022'0                                            X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# |             440:  %c1_i32 = arith.constant 1 : i32 
# | check:1022'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:1022'1      ?                                 possible intended match
# |             441:  %0 = "some_fp_op"() : () -> f32 
# | check:1022'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             442:  %1 = scf.for %arg4 = %arg0 to %arg1 step %arg2 iter_args(%arg5 = %c1_i32) -> (i32) { 
# | check:1022'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             443:  %3 = "some_int_op"() : () -> i32 
# | check:1022'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             444:  scf.yield %3 : i32 
# | check:1022'0     ~~~~~~~~~~~~~~~~~~~~
# |             445:  } 
# | check:1022'0     ~~~
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 28, 2025

LLVM Buildbot has detected a new failure on builder ppc64le-mlir-rhel-clang running on ppc64le-mlir-rhel-test while building mlir at step 6 "test-build-check-mlir-build-only-check-mlir".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-check-mlir-build-only-check-mlir) failure: test (failure)
******************** TEST 'MLIR :: Dialect/Arith/int-range-interface.mlir' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-opt -allow-unregistered-dialect -int-range-optimizations -canonicalize /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir | /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir
# executed command: /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/mlir-opt -allow-unregistered-dialect -int-range-optimizations -canonicalize /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir
# executed command: /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/build/bin/FileCheck /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir
# .---command stderr------------
# | /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir:1022:12: error: CHECK: expected string not found in input
# |  // CHECK: [[OUTS:%.*]]:2 = scf.for
# |            ^
# | <stdin>:439:40: note: scanning from here
# |  func.func @noninteger_operation_result(%arg0: index, %arg1: index, %arg2: index, %arg3: i1) {
# |                                        ^
# | <stdin>:440:2: note: possible intended match here
# |  %c1_i32 = arith.constant 1 : i32
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/buildbots/llvm-external-buildbots/workers/ppc64le-mlir-rhel-test/ppc64le-mlir-rhel-clang-build/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |               .
# |               .
# |               .
# |             434:  return 
# |             435:  } 
# |             436:  func.func @zero_trip_loop2() { 
# |             437:  return 
# |             438:  } 
# |             439:  func.func @noninteger_operation_result(%arg0: index, %arg1: index, %arg2: index, %arg3: i1) { 
# | check:1022'0                                            X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# |             440:  %c1_i32 = arith.constant 1 : i32 
# | check:1022'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:1022'1      ?                                 possible intended match
# |             441:  %0 = "some_fp_op"() : () -> f32 
# | check:1022'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             442:  %1 = scf.for %arg4 = %arg0 to %arg1 step %arg2 iter_args(%arg5 = %c1_i32) -> (i32) { 
# | check:1022'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             443:  %3 = "some_int_op"() : () -> i32 
# | check:1022'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             444:  scf.yield %3 : i32 
# | check:1022'0     ~~~~~~~~~~~~~~~~~~~~
# |             445:  } 
# | check:1022'0     ~~~
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 29, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux-fast running on sanitizer-buildbot3 while building mlir at step 2 "annotate".

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

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-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/main.py:72: 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: 89805 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.
FAIL: MLIR :: Dialect/Arith/int-range-interface.mlir (41567 of 89805)
******************** TEST 'MLIR :: Dialect/Arith/int-range-interface.mlir' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/mlir-opt -allow-unregistered-dialect -int-range-optimizations -canonicalize /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir | /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir
# executed command: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/mlir-opt -allow-unregistered-dialect -int-range-optimizations -canonicalize /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir
# note: command had no output on stdout or stderr
# executed command: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir
# .---command stderr------------
# | /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir:1022:12: error: CHECK: expected string not found in input
# |  // CHECK: [[OUTS:%.*]]:2 = scf.for
# |            ^
# | <stdin>:439:40: note: scanning from here
# |  func.func @noninteger_operation_result(%arg0: index, %arg1: index, %arg2: index, %arg3: i1) {
# |                                        ^
# | <stdin>:440:2: note: possible intended match here
# |  %c1_i32 = arith.constant 1 : i32
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |               .
# |               .
# |               .
# |             434:  return 
# |             435:  } 
# |             436:  func.func @zero_trip_loop2() { 
# |             437:  return 
# |             438:  } 
# |             439:  func.func @noninteger_operation_result(%arg0: index, %arg1: index, %arg2: index, %arg3: i1) { 
# | check:1022'0                                            X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
Step 10 (stage2/asan_ubsan check) failure: stage2/asan_ubsan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/main.py:72: 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: 89805 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.
FAIL: MLIR :: Dialect/Arith/int-range-interface.mlir (41567 of 89805)
******************** TEST 'MLIR :: Dialect/Arith/int-range-interface.mlir' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/mlir-opt -allow-unregistered-dialect -int-range-optimizations -canonicalize /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir | /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir
# executed command: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/mlir-opt -allow-unregistered-dialect -int-range-optimizations -canonicalize /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir
# note: command had no output on stdout or stderr
# executed command: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir
# .---command stderr------------
# | /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir:1022:12: error: CHECK: expected string not found in input
# |  // CHECK: [[OUTS:%.*]]:2 = scf.for
# |            ^
# | <stdin>:439:40: note: scanning from here
# |  func.func @noninteger_operation_result(%arg0: index, %arg1: index, %arg2: index, %arg3: i1) {
# |                                        ^
# | <stdin>:440:2: note: possible intended match here
# |  %c1_i32 = arith.constant 1 : i32
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |               .
# |               .
# |               .
# |             434:  return 
# |             435:  } 
# |             436:  func.func @zero_trip_loop2() { 
# |             437:  return 
# |             438:  } 
# |             439:  func.func @noninteger_operation_result(%arg0: index, %arg1: index, %arg2: index, %arg3: i1) { 
# | check:1022'0                                            X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
Step 14 (stage2/msan check) failure: stage2/msan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/main.py:72: 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: 89803 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80..
FAIL: MLIR :: Dialect/Arith/int-range-interface.mlir (28769 of 89803)
******************** TEST 'MLIR :: Dialect/Arith/int-range-interface.mlir' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/mlir-opt -allow-unregistered-dialect -int-range-optimizations -canonicalize /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir | /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir
# executed command: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/mlir-opt -allow-unregistered-dialect -int-range-optimizations -canonicalize /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir
# note: command had no output on stdout or stderr
# executed command: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/FileCheck /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir
# .---command stderr------------
# | /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir:1022:12: error: CHECK: expected string not found in input
# |  // CHECK: [[OUTS:%.*]]:2 = scf.for
# |            ^
# | <stdin>:439:40: note: scanning from here
# |  func.func @noninteger_operation_result(%arg0: index, %arg1: index, %arg2: index, %arg3: i1) {
# |                                        ^
# | <stdin>:440:2: note: possible intended match here
# |  %c1_i32 = arith.constant 1 : i32
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/mlir/test/Dialect/Arith/int-range-interface.mlir
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |               .
# |               .
# |               .
# |             434:  return 
# |             435:  } 
# |             436:  func.func @zero_trip_loop2() { 
# |             437:  return 
# |             438:  } 
# |             439:  func.func @noninteger_operation_result(%arg0: index, %arg1: index, %arg2: index, %arg3: i1) { 
# | check:1022'0                                            X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found

@kuhar kuhar requested a review from krzysz00 March 29, 2025 01:10
@kuhar
Copy link
Member

kuhar commented Mar 29, 2025

@Mogball did you intend to merge this without any review?

@Mogball
Copy link
Contributor Author

Mogball commented Mar 29, 2025

I thought the bug was severe and the fix was self evident enough. I did forget to CTRL+S the lit test but I fixed that in a follow up 🤦

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.

4 participants