add -Zforce-intrinsic-fallback flag#158377
Conversation
|
cc @bjorn3
|
|
r? @adwinwhite rustbot has assigned @adwinwhite. Use Why was this reviewer chosen?The reviewer was selected based on:
|
-Zforce_intrinsic_fallback flag-Zforce-intrinsic-fallback flag
5c1f7b7 to
c9f5a33
Compare
|
r? codegen |
c9f5a33 to
5da2144
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
| @@ -0,0 +1,71 @@ | |||
| //@ add-minicore | |||
| //@ assembly-output: emit-asm | |||
There was a problem hiding this comment.
I'm kinda puzzled here: why does this need assembly output? If it wants to be checking assembly should it be in assembly-llvm instead? For that matter, why does it need minicore?
Could this just be a normal codegen test that calls std::intrinsics::sqrtf32? Looking at llvm-ir should be pretty portable for it, no? (Especially with -C no-prepopulate-passes so it just sees what we emit, not post-optimization IR.)
There was a problem hiding this comment.
Right, this was an assembly test originally, but LLVM made more sense.
I've made it generic now, with -C no-prepopulate-passes -Copt-level=3 so hopefully the IR should be stable enough.
There was a problem hiding this comment.
Also given that you've now looked at this code a bunch, maybe you can review it?
fb0a1e2 to
76314f6
Compare
76314f6 to
69d7670
Compare
|
I got here eventually! @bors r+ |
…k, r=saethlin add `-Zforce-intrinsic-fallback` flag Add a flag that forces the use of the fallback body (if one exists), so that we can test that these fallback implementations actually work. cc rust-lang#150946 cc [#t-compiler > testing intrinsic fallback bodies](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/testing.20intrinsic.20fallback.20bodies/with/606299558)
Add a flag that forces the use of the fallback body (if one exists), so that we can test that these fallback implementations actually work.
cc #150946
cc #t-compiler > testing intrinsic fallback bodies
cc #t-infra > CI for -Zforce-intrinsic-fallback