-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add codegen test for issue #73827 #78046
Conversation
(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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to move this line up and move it below the CHECK-LABEL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is fine. I just prefer to do whatever https://llvm.org/docs/CommandGuide/FileCheck.html does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 :)
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)? |
@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. |
📌 Commit 64c239c has been approved by |
Add codegen test for issue rust-lang#73827 Closes rust-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