llvm: Fix array ABI test to not check equality implementation#154731
llvm: Fix array ABI test to not check equality implementation#154731rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Conversation
There was a problem hiding this comment.
Based on history, I believe the test actually intended validate that these arrays were being passed as pointer arguments, which can be done more directly.
No, that's incorrect. If it was just that, it would be in the ABI test files instead.
It's from #85828 which is about how the equality codegen is generated. This test is there to test the case that's not using the special type_ix path, so I think it should still have validation for the body -- otherwise it's not useful.
|
Reminder, once the PR becomes ready for a review, use |
|
Pondering: maybe this rust/compiler/rustc_codegen_llvm/src/intrinsic.rs Lines 514 to 551 in 2972b5e llvm/llvm-project#77370 ought to be strictly better than it. The LLVM-specific override was only added because the (Assuming, of course, that we still do a good job on |
|
I'll try out switching off the |
|
Specifically, the output looks like this: |
|
r? @scottmcm |
|
Using revisions for different checks for different LLVM versions would be the most straight-forward way to check different stuff. Maybe validating that there's are icmps but no As an aside, seems like there's an LLVM bug to be seen in that output too, perhaps? 39: %12 = zext i1 %11 to i32
40: %13 = icmp eq i32 %12, 0in opt-level=3 is weird to me -- why not |
|
I tried suppressing the rewrite in the sense of making The LLVM PR suggests that "we mostly don't benefit from additional optimizations yet", so perhaps just calling I've updated the test as you suggested, splitting the test into a llvm-current and llvm-next revision, with llvm-current checking the current properties and llvm-next just validating that there are no alloca or call statements, and there is an icmp. @rustbot ready |
This comment has been minimized.
This comment has been minimized.
LLVM has moved memcmp expansion in the pipeline, resulting in the bcmp call being expanded into loads and register comparisons, which breaks the test. Based on history, I believe the test actually intended validate that these arrays were being passed as pointer arguments, which can be done more directly.
Ah, thanks for trying it. Hopefully we'll be able to do that in future. @bors r+ rollup=iffy (multi-version LLVM codegen test is extra scary) |
Rollup of 5 pull requests Successful merges: - #154376 (Remove more BuiltinLintDiag variants - part 4) - #154731 (llvm: Fix array ABI test to not check equality implementation) - #127534 (feat(core): impl Step for NonZero<u*>) - #154703 (Fix trailing comma in lifetime suggestion for empty angle brackets) - #154776 (Fix ICE in read_discriminant for enums with non-contiguous discriminants)
Rollup merge of #154731 - maurer:array-abi-test, r=scottmcm llvm: Fix array ABI test to not check equality implementation LLVM has moved memcmp expansion in the pipeline, resulting in the bcmp call being expanded into loads and register comparisons, which breaks the test. See llvm/llvm-project#77370 Based on history, I believe the test actually intended validate that these arrays were being passed as pointer arguments, which can be done more directly. r? @durin42 cc @scottmcm (author of the test being modified) @rustbot label llvm-main
LLVM has moved memcmp expansion in the pipeline, resulting in the bcmp call being expanded into loads and register comparisons, which breaks the test.
See llvm/llvm-project#77370
Based on history, I believe the test actually intended validate that these arrays were being passed as pointer arguments, which can be done more directly.
r? @durin42
cc @scottmcm (author of the test being modified)
@rustbot label llvm-main