File tree Expand file tree Collapse file tree 3 files changed +2
-7
lines changed Expand file tree Collapse file tree 3 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -621,6 +621,7 @@ function is_pure_intrinsic_infer(f::IntrinsicFunction)
621621 f === Intrinsics. pointerset || # this one is never effect-free
622622 f === Intrinsics. llvmcall || # this one is never effect-free
623623 f === Intrinsics. arraylen || # this one is volatile
624+ f === Intrinsics. sqrt_llvm || # this one may differ at runtime (by a few ulps)
624625 f === Intrinsics. sqrt_llvm_fast || # this one may differ at runtime (by a few ulps)
625626 f === Intrinsics. have_fma || # this one depends on the runtime environment
626627 f === Intrinsics. cglobal) # cglobal lookup answer changes at runtime
Original file line number Diff line number Diff line change 892892 @test fully_eliminated (ftest, Tuple{Bool})
893893end
894894
895- # sqrt not considered volatile
896- f_sqrt () = sqrt (2 )
897- @test fully_eliminated (f_sqrt, Tuple{})
898-
899895# use constant prop' result even when the return type doesn't get refined
900896const Gx = Ref {Any} ()
901897Base. @constprop :aggressive function conditional_escape! (cnd, x)
Original file line number Diff line number Diff line change @@ -1386,11 +1386,9 @@ end
13861386 # Runtime version
13871387 @test sqrt (x) === y
13881388 # Interpreter compile-time version
1389- @test Base. invokelatest ((@eval ()-> sqrt (Base. inferencebarrier ($ x)))) == y
1390- # Inference const-prop version
13911389 @test Base. invokelatest ((@eval ()-> sqrt ($ x))) == y
13921390 # LLVM constant folding version
1393- @test Base. invokelatest ((@eval ()-> (@force_compile ; sqrt (Base . inferencebarrier ( $ x) )))) == y
1391+ @test Base. invokelatest ((@eval ()-> (@force_compile ; sqrt ($ x )))) == y
13941392 end
13951393end
13961394
You can’t perform that action at this time.
0 commit comments