-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Add codegen tests for E-needs-test #125347
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
36e1414
add codegen test for #120440
tesuji f3c89f1
add codegen test for issue-118392, 71096
tesuji f37c576
add codegen test for #113757
tesuji beabc56
add codegen test for #112509
tesuji 15d07fb
Add codegen test for #111508
tesuji ddb94db
add codegen test for #110797
tesuji 7d967ff
add codegen test for #109328
tesuji 8bd6c04
add codegen test for #93036
tesuji 2120ea5
add assembly test for #83585
tesuji bf17818
add codegen test for #74938
tesuji 5f527eb
add codegen test for #68667
tesuji 95740fb
add codegen test for #36010
tesuji f9edd86
Apply suggestions from code review
tesuji ab0f87e
Fix tests for 32 bits targets
tesuji File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add codegen test for #110797
- Loading branch information
commit ddb94dbd16760d6de5e3a9cbbffb66e161691786
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| //@ compile-flags: -O | ||
| // XXX: The x86-64 assembly get optimized correclty. But llvm-ir output is not until llvm 18? | ||
| //@ min-llvm-version: 18 | ||
|
|
||
| #![crate_type = "lib"] | ||
|
|
||
| pub enum K{ | ||
| A(Box<[i32]>), | ||
| B(Box<[u8]>), | ||
| C(Box<[String]>), | ||
| D(Box<[u16]>), | ||
| } | ||
|
|
||
| #[no_mangle] | ||
| // CHECK-LABEL: @get_len | ||
| // CHECK: getelementptr inbounds | ||
| // CHECK-NEXT: load | ||
| // CHECK-NEXT: ret i64 | ||
| // CHECK-NOT: switch | ||
| pub fn get_len(arg: &K)->usize{ | ||
| match arg { | ||
| K::A(ref lst)=>lst.len(), | ||
| K::B(ref lst)=>lst.len(), | ||
| K::C(ref lst)=>lst.len(), | ||
| K::D(ref lst)=>lst.len(), | ||
| } | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.