Uh oh!
There was an error while loading. Please reload this page.
Add codegen test for issue #73827 - #78046
Conversation
rust-highfive
commented
Oct 17, 2020
(rust_highfive has picked a reviewer for you, use r? to override) |
| if x > 7 || y > 7 { | ||
| 0 | ||
| } else { | ||
| // CHECK-NOT: panic_bounds_check |
There was a problem hiding this comment.
I'd prefer to move this line up and move it below the CHECK-LABEL.
There was a problem hiding this comment.
I don't want to write this as a dismissal, but I personally prefer having them where I expect the instruction to (not) be.
There was a problem hiding this comment.
That is fine. I just prefer to do whatever https://llvm.org/docs/CommandGuide/FileCheck.html does.
There was a problem hiding this comment.
I guess when you have two languages that are close enough, mixing them could seem messy. But with Rust I feel marking the problematic point can have a tiny bit of usefulness :)
Mark-Simulacrum
commented
Oct 20, 2020
r? @nikic I think this is right though negative testing is always a bit concerning (if we were to rename panic_bounds_check it seems like this test would continue to pass, despite being wrong). Have we verified that it fails on older rustc compilers (that didn't have LLVM 11)? |
nikic
commented
Oct 20, 2020
@bors r+ rollup Yeah, negative testing can fail if the function gets renamed, but generating full positive check lines couples us too tightly to LLVM. We already have plenty of other tests that use CHECK-NOT: panic_bounds_check, so I think it's fine to go with this. |
bors
commented
Oct 20, 2020
📌 Commit 64c239c has been approved by |
Add codegen test for issue rust-lang#73827Closesrust-lang#73827
…laumeGomez Rollup of 9 pull requests Successful merges: - rust-lang#78046 (Add codegen test for issue rust-lang#73827) - rust-lang#78061 (Optimize const value interning for ZST types) - rust-lang#78070 (we can test std and core panic macros together) - rust-lang#78076 (Move orphan module-name/mod.rs files into module-name.rs files) - rust-lang#78129 (Wrapping intrinsics doc links update.) - rust-lang#78133 (Add some MIR-related regression tests) - rust-lang#78144 (Don't update `entries` in `TypedArena` if T does not need drop) - rust-lang#78145 (Drop unneeded `mut`) - rust-lang#78157 (Remove unused type from librustdoc) Failed merges: r? `@ghost`
Closes#73827