@@ -1840,26 +1840,16 @@ end
1840
1840
# Test that inlining can still use nothrow information from concrete-eval
1841
1841
# even if the result itself is too big to be inlined, and nothrow is not
1842
1842
# known without concrete-eval
1843
- const THE_BIG_TUPLE = ntuple (identity, 1024 )
1843
+ const THE_BIG_TUPLE = ntuple (identity, 1024 );
1844
1844
function return_the_big_tuple (err:: Bool )
1845
1845
err && error (" BAD" )
1846
1846
return THE_BIG_TUPLE
1847
1847
end
1848
- @noinline function return_the_big_tuple_noinline (err:: Bool )
1849
- err && error (" BAD" )
1850
- return THE_BIG_TUPLE
1848
+ @test fully_eliminated () do
1849
+ return_the_big_tuple (false )[1 ]
1851
1850
end
1852
- big_tuple_test1 () = return_the_big_tuple (false )[1 ]
1853
- big_tuple_test2 () = return_the_big_tuple_noinline (false )[1 ]
1854
-
1855
- @test fully_eliminated (big_tuple_test2, Tuple{})
1856
- # Currently we don't run these cleanup passes, but let's make sure that
1857
- # if we did, inlining would be able to remove this
1858
- let ir = Base. code_ircode (big_tuple_test1, Tuple{})[1 ][1 ]
1859
- ir = Core. Compiler. compact! (ir, true )
1860
- ir = Core. Compiler. cfg_simplify! (ir)
1861
- ir = Core. Compiler. compact! (ir, true )
1862
- @test length (ir. stmts) == 1
1851
+ @test fully_eliminated () do
1852
+ @inline return_the_big_tuple (false )[1 ]
1863
1853
end
1864
1854
1865
1855
# inlineable but removable call should be eligible for DCE
0 commit comments