mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
[InstCombine] Canonicalize single element array store
Use the element type instead of the aggregate type. Differential Revision: http://reviews.llvm.org/D9591 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236969 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -32,6 +32,26 @@ body:
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @storeArrayOfA() {
|
||||
body:
|
||||
%0 = tail call i8* @allocmemory(i64 32)
|
||||
%1 = bitcast i8* %0 to [1 x %A]*
|
||||
; CHECK-LABEL: storeStructOfA
|
||||
; CHECK: store %A__vtbl* @A__vtblZ
|
||||
store [1 x %A] [%A { %A__vtbl* @A__vtblZ }], [1 x %A]* %1, align 8
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @storeStructOfArrayOfA() {
|
||||
body:
|
||||
%0 = tail call i8* @allocmemory(i64 32)
|
||||
%1 = bitcast i8* %0 to { [1 x %A] }*
|
||||
; CHECK-LABEL: storeStructOfArrayOfA
|
||||
; CHECK: store %A__vtbl* @A__vtblZ
|
||||
store { [1 x %A] } { [1 x %A] [%A { %A__vtbl* @A__vtblZ }] }, { [1 x %A] }* %1, align 8
|
||||
ret void
|
||||
}
|
||||
|
||||
define %A @loadA() {
|
||||
body:
|
||||
%0 = tail call i8* @allocmemory(i64 32)
|
||||
|
||||
Reference in New Issue
Block a user