mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
2362398441
The code assumed that zero-extending the integer constant to the designated alloc size would be fine even for BE targets, but that's not the case as that pulls in zeros from the MSB side while we actually expect the padding zeros to go after the LSB. I've changed the codepath handling the constant integers to use the store size for both small(er than u64) and big constants and then add zero padding right after that. Differential Revision: https://reviews.llvm.org/D78011
32 lines
884 B
LLVM
32 lines
884 B
LLVM
; RUN: llc -mtriple=x86_64-apple-darwin < %s | FileCheck %s
|
|
|
|
@test1 = global [2 x i24] [i24 -1, i24 -1]
|
|
; CHECK-LABEL: test1:
|
|
; CHECK-NEXT: .short 65535
|
|
; CHECK-NEXT: .byte 255
|
|
; CHECK-NEXT: .space 1
|
|
; CHECK-NEXT: .short 65535
|
|
; CHECK-NEXT: .byte 255
|
|
; CHECK-NEXT: .space 1
|
|
|
|
@test2 = global [2 x i7] [i7 1, i7 1]
|
|
; CHECK-LABEL: test2:
|
|
; CHECK-NEXT: .space 2,1
|
|
|
|
@test3 = global [4 x i128] [i128 -1, i128 -1, i128 -1, i128 -1]
|
|
; CHECK-LABEL: test3:
|
|
; CHECK-NEXT: .space 64,255
|
|
|
|
@test4 = global [3 x i16] [i16 257, i16 257, i16 257]
|
|
; CHECK-LABEL: test4:
|
|
; CHECK-NEXT: .space 6,1
|
|
|
|
@test5 = global [2 x [2 x i16]] [[2 x i16] [i16 257, i16 257], [2 x i16] [i16 -1, i16 -1]]
|
|
; CHECK-LABEL: test5:
|
|
; CHECK-NEXT: .space 4,1
|
|
; CHECK-NEXT: .space 4,255
|
|
|
|
@test6 = global [2 x [2 x i16]] [[2 x i16] [i16 257, i16 257], [2 x i16] [i16 257, i16 257]]
|
|
; CHECK-LABEL: test6:
|
|
; CHECK-NEXT: .space 8,1
|