Skip to content

Test branching reductions with loop-carried booleans - #679

Merged
maleadt merged 1 commit into
mainfrom
tb/branching-reduction-678
Oct 13, 2026
Merged

maleadt merged 1 commit into
mainfrom
tb/branching-reduction-678

Conversation

@maleadt

@maleadt maleadt commented Oct 10, 2026

Copy link
Copy Markdown
Member

A branching mapreduce over two equal 64×64 arrays returned is_equal=false on Julia 1.12 with bounds checks enabled (#678). IGC's PromoteSubByte pass promoted and then erased its own replacement instructions, leaving undefined operands in loop-carried booleans.

Add a regression that checks equal inputs and a mismatch in the last element. The compiler fix is shipped in libigc_jll 2.34.4+3 (Yggdrasil#15068) and proposed upstream in IGC#450. Julia 1.12 is already covered by the branch-build CI matrix.

Validated on Intel Iris Xe, Julia 1.12.7, with --check-bounds=yes and the persistent kernel cache disabled: both new assertions pass with +3; pinning +2 makes the equal-input assertion fail. The array suite passes all 191 assertions. The full suite is running.

@github-actions

Copy link
Copy Markdown
Contributor

Your PR requires formatting changes to meet the project's style guidelines.
Please consider running Runic (git runic main) to apply these changes.

Click here to view the suggested changes.
diff --git a/test/array.jl b/test/array.jl
index 2035590..9bf025a 100644
--- a/test/array.jl
+++ b/test/array.jl
@@ -244,11 +244,11 @@ end
     A = rand(Int32(1):Int32(4), 64, 64)
     dA = oneArray(A)
     dB = oneArray(A)
-    init = (; is_missing=false, is_equal=true)
-    mapper(a, b) = (; is_missing=false, is_equal=a == b)
+    init = (; is_missing = false, is_equal = true)
+    mapper(a, b) = (; is_missing = false, is_equal = a == b)
     branching(a, b) = (a.is_missing || b.is_missing) ?
-        (; is_missing=true, is_equal=false) :
-        (; is_missing=false, is_equal=a.is_equal & b.is_equal)
+        (; is_missing = true, is_equal = false) :
+        (; is_missing = false, is_equal = a.is_equal & b.is_equal)
 
     @test mapreduce(mapper, branching, dA, dB; init) == init
 
@@ -256,7 +256,7 @@ end
     B[end] += Int32(1)
     copyto!(dB, B)
     @test mapreduce(mapper, branching, dA, dB; init) ==
-        (; is_missing=false, is_equal=false)
+        (; is_missing = false, is_equal = false)
 end
 
 @testset "narrow integer reduction with overflowing map" begin

@codecov

codecov Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.26%. Comparing base (e1e564d) to head (c31fb48).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #679      +/-   ##
==========================================
- Coverage   80.56%   80.26%   -0.30%     
==========================================
  Files          52       51       -1     
  Lines        3961     3938      -23     
==========================================
- Hits         3191     3161      -30     
- Misses        770      777       +7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@maleadt
maleadt merged commit fa0f23a into main Oct 13, 2026
5 checks passed
@maleadt
maleadt deleted the tb/branching-reduction-678 branch October 13, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant