Skip to content
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 Four Codegen Tests #134626

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

veera-sivarajan
Copy link
Contributor

Closes #74615
Closes #123216
Closes #49572
Closes #93514

This PR adds four codegen tests. The FileCheck assertions were generated with the help of update_test_checks.py and update_llc_test_checks.py from the LLVM project.

@rustbot
Copy link
Collaborator

rustbot commented Dec 21, 2024

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 21, 2024
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-18 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#21 exporting to docker image format
#21 sending tarball 27.1s done
#21 DONE 32.3s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-18]
debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured.
---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-18', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-18/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---
failures:

---- [assembly] tests/assembly/indexing-with-bools-no-redundant-instructions.rs stdout ----

error: verification with 'FileCheck' failed
status: exit status: 1
command: "/usr/lib/llvm-18/bin/FileCheck" "--input-file" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/assembly/indexing-with-bools-no-redundant-instructions/indexing-with-bools-no-redundant-instructions.s" "/checkout/tests/assembly/indexing-with-bools-no-redundant-instructions.rs" "--check-prefix=CHECK" "--allow-unused-prefixes" "--dump-input-context" "100"
--- stderr -------------------------------
/checkout/tests/assembly/indexing-with-bools-no-redundant-instructions.rs:14:17: error: CHECK-NEXT: expected string not found in input
/checkout/tests/assembly/indexing-with-bools-no-redundant-instructions.rs:14:17: error: CHECK-NEXT: expected string not found in input
 // CHECK-NEXT: je .LBB0_2
/checkout/obj/build/x86_64-unknown-linux-gnu/test/assembly/indexing-with-bools-no-redundant-instructions/indexing-with-bools-no-redundant-instructions.s:9:18: note: scanning from here
/checkout/obj/build/x86_64-unknown-linux-gnu/test/assembly/indexing-with-bools-no-redundant-instructions/indexing-with-bools-no-redundant-instructions.s:9:18: note: scanning from here
 testl %esi, %esi
/checkout/obj/build/x86_64-unknown-linux-gnu/test/assembly/indexing-with-bools-no-redundant-instructions/indexing-with-bools-no-redundant-instructions.s:10:2: note: possible intended match here
 je .LBB0_1
 ^


Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/assembly/indexing-with-bools-no-redundant-instructions/indexing-with-bools-no-redundant-instructions.s
Check file: /checkout/tests/assembly/indexing-with-bools-no-redundant-instructions.rs

-dump-input=help explains the following input dump.
Input was:
<<<<<<
           1:  .text 
           1:  .text 
           2:  .file "indexing_with_bools_no_redundant_instructions.43d038d86a482d16-cgu.0" 
           3:  .section .text.f,"ax",@progbits 
           4:  .globl f 
           5:  .p2align 4, 0x90 
           6:  .type f,@function 
           7: f: 
           8:  .cfi_startproc 
           9:  testl %esi, %esi 
next:14'0                      X error: no match found
          10:  je .LBB0_1 
next:14'0     ~~~~~~~~~~~~
next:14'1      ?           possible intended match
          11:  xorb %dl, %dil 
next:14'0     ~~~~~~~~~~~~~~~~
          12:  orb $1, (%rcx) 
next:14'0     ~~~~~~~~~~~~~~~~
          13:  jmp .LBB0_3 
next:14'0     ~~~~~~~~~~~~~
          14: .LBB0_1: 
next:14'0     ~~~~~~~~~
          15:  andb $1, %dil 
next:14'0     ~~~~~~~~~~~~~~~
          16: .LBB0_3: 
next:14'0     ~~~~~~~~~
          17:  movzbl %dil, %eax 
next:14'0     ~~~~~~~~~~~~~~~~~~~
          18:  andl $1, %eax 
next:14'0     ~~~~~~~~~~~~~~~
          19:  shll $4, %eax 
next:14'0     ~~~~~~~~~~~~~~~
          20:  orb $1, (%rcx,%rax) 
next:14'0     ~~~~~~~~~~~~~~~~~~~~~
          21:  retq 
next:14'0     ~~~~~~
          22: .Lfunc_end0: 
next:14'0     ~~~~~~~~~~~~~
          23:  .size f, .Lfunc_end0-f 
next:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~
          24:  .cfi_endproc 
next:14'0     ~~~~~~~~~~~~~~
next:14'0     ~
next:14'0     ~
          26:  .ident "rustc version 1.85.0-nightly (cea263bb2 2024-12-22)" 
next:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          27:  .section ".note.GNU-stack","",@progbits 
next:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------------------



Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
4 participants