Skip to content

Commit

Permalink
Auto merge of rust-lang#123616 - bzEq:fix-be-test, r=jhpratt
Browse files Browse the repository at this point in the history
[Test] issue-122805.rs should limit to little endian target

In issue-122805.rs, codegen on big endian target is different from little endian target.
```llvm
%0 = load <8 x i16>, ptr %value, align 2
store <8 x i16> %0, ptr %_0, align 1
ret void
```
This is expected since the conversion is unnecessary on BE target for this case.
  • Loading branch information
bors committed Apr 8, 2024
2 parents f2c8013 + d8d1e6c commit 7a495cc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/codegen/issues/issue-122805.rs
Expand Up @@ -20,6 +20,7 @@
// CHECK-NEXT: store <8 x i16>
// CHECK-NEXT: ret void
#[no_mangle]
#[cfg(target_endian = "little")]
pub fn convert(value: [u16; 8]) -> [u8; 16] {
let addr16 = [
value[0].to_be(),
Expand Down

0 comments on commit 7a495cc

Please sign in to comment.