@@ -1584,7 +1584,7 @@ end
1584
1584
end
1585
1585
1586
1586
module IRUtils
1587
- include (normpath ( @__DIR__ , " ./ compiler/irutils.jl" ) )
1587
+ include (" compiler/irutils.jl" )
1588
1588
end
1589
1589
1590
1590
@testset " strides for ReshapedArray" begin
@@ -1599,7 +1599,7 @@ end
1599
1599
return true
1600
1600
end
1601
1601
# Type-based contiguous Check
1602
- a = vec (reinterpret (reshape,Int16,reshape (view (reinterpret (Int32,randn (10 )),2 : 11 ),5 , :)))
1602
+ a = vec (reinterpret (reshape, Int16, reshape (view (reinterpret (Int32, randn (10 )), 2 : 11 ), 5 , :)))
1603
1603
f (a) = only (strides (a));
1604
1604
@test IRUtils. fully_eliminated (f, Base. typesof (a)) && f (a) == 1
1605
1605
# General contiguous check
@@ -1674,14 +1674,14 @@ end
1674
1674
tb = reinterpret (Float64, view (a, 1 : 2 : 10 ))
1675
1675
tc = reinterpret (Float64, reshape (view (a, 1 : 3 : 10 ), 2 , 2 , 1 ))
1676
1676
# Issue #44040
1677
- @test IRUtils. fully_eliminated (Base. require_one_based_indexing, Base. typesof (ta,tc))
1678
- @test IRUtils. fully_eliminated (Base. require_one_based_indexing, Base. typesof (tc,tc))
1679
- @test IRUtils. fully_eliminated (Base. require_one_based_indexing, Base. typesof (ta,tc,tb))
1677
+ @test IRUtils. fully_eliminated (Base. require_one_based_indexing, Base. typesof (ta, tc))
1678
+ @test IRUtils. fully_eliminated (Base. require_one_based_indexing, Base. typesof (tc, tc))
1679
+ @test IRUtils. fully_eliminated (Base. require_one_based_indexing, Base. typesof (ta, tc, tb))
1680
1680
# Ranges && CartesianIndices
1681
- @test IRUtils. fully_eliminated (Base. require_one_based_indexing, Base. typesof (1 : 10 ,Base. OneTo (10 ),1.0 : 2.0 ,LinRange (1.0 ,2.0 ,2 ),1 : 2 : 10 ,CartesianIndices ((1 : 2 : 10 ,1 : 2 : 10 ))))
1681
+ @test IRUtils. fully_eliminated (Base. require_one_based_indexing, Base. typesof (1 : 10 , Base. OneTo (10 ), 1.0 : 2.0 , LinRange (1.0 , 2.0 , 2 ), 1 : 2 : 10 , CartesianIndices ((1 : 2 : 10 , 1 : 2 : 10 ))))
1682
1682
# Remind us to call `any` in `Base.has_offset_axes` once our compiler is ready.
1683
- @inline _has_offset_axes (A) = @inline any (x-> Int (first (x)):: Int != 1 , axes (A))
1683
+ @inline _has_offset_axes (A) = @inline any (x -> Int (first (x)):: Int != 1 , axes (A))
1684
1684
@inline _has_offset_axes (As... ) = @inline any (_has_offset_axes, As)
1685
- a, b = zeros (2 ,2 , 2 ), zeros (2 ,2 )
1686
- @test_broken IRUtils. fully_eliminated (_has_offset_axes, Base. typesof (a,a,b, b))
1685
+ a, b = zeros (2 , 2 , 2 ), zeros (2 , 2 )
1686
+ @test_broken IRUtils. fully_eliminated (_has_offset_axes, Base. typesof (a, a, b, b))
1687
1687
end
0 commit comments