mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
d49cb60862
Summary: This catches malformed mir files which specify alignment as log2 instead of pow2. See https://reviews.llvm.org/D65945 for reference, This is patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Reviewers: courbet Subscribers: MatzeB, qcolombet, dschuff, arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, s.egerton, pzheng, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67433 llvm-svn: 371608
58 lines
2.0 KiB
YAML
58 lines
2.0 KiB
YAML
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
|
# RUN: llc -O0 -mtriple=x86_64-linux-gnu -run-pass=legalizer -o - %s | FileCheck -check-prefix=X64 %s
|
|
|
|
---
|
|
name: test_memop_s8tos32
|
|
alignment: 16
|
|
legalized: false
|
|
regBankSelected: false
|
|
body: |
|
|
bb.0:
|
|
; X64-LABEL: name: test_memop_s8tos32
|
|
; X64: [[DEF:%[0-9]+]]:_(p0) = IMPLICIT_DEF
|
|
; X64: [[LOAD:%[0-9]+]]:_(s8) = G_LOAD [[DEF]](p0) :: (load 1)
|
|
; X64: [[LOAD1:%[0-9]+]]:_(s8) = G_LOAD [[DEF]](p0) :: (load 1)
|
|
; X64: [[LOAD2:%[0-9]+]]:_(s16) = G_LOAD [[DEF]](p0) :: (load 2)
|
|
; X64: [[LOAD3:%[0-9]+]]:_(s32) = G_LOAD [[DEF]](p0) :: (load 4)
|
|
; X64: [[LOAD4:%[0-9]+]]:_(p0) = G_LOAD [[DEF]](p0) :: (load 4)
|
|
; X64: [[C:%[0-9]+]]:_(s8) = G_CONSTANT i8 1
|
|
; X64: [[COPY:%[0-9]+]]:_(s8) = COPY [[LOAD]](s8)
|
|
; X64: [[AND:%[0-9]+]]:_(s8) = G_AND [[COPY]], [[C]]
|
|
; X64: G_STORE [[AND]](s8), [[DEF]](p0) :: (store 1)
|
|
; X64: G_STORE [[LOAD1]](s8), [[DEF]](p0) :: (store 1)
|
|
; X64: G_STORE [[LOAD2]](s16), [[DEF]](p0) :: (store 2)
|
|
; X64: G_STORE [[LOAD3]](s32), [[DEF]](p0) :: (store 4)
|
|
; X64: G_STORE [[LOAD4]](p0), [[DEF]](p0) :: (store 4)
|
|
%0:_(p0) = IMPLICIT_DEF
|
|
%9:_(s1) = G_LOAD %0(p0) :: (load 1)
|
|
%1:_(s8) = G_LOAD %0(p0) :: (load 1)
|
|
%2:_(s16) = G_LOAD %0(p0) :: (load 2)
|
|
%3:_(s32) = G_LOAD %0(p0) :: (load 4)
|
|
%4:_(p0) = G_LOAD %0(p0) :: (load 4)
|
|
|
|
G_STORE %9, %0 :: (store 1)
|
|
G_STORE %1, %0 :: (store 1)
|
|
G_STORE %2, %0 :: (store 2)
|
|
G_STORE %3, %0 :: (store 4)
|
|
G_STORE %4, %0 :: (store 4)
|
|
...
|
|
---
|
|
name: test_memop_s64
|
|
alignment: 16
|
|
legalized: false
|
|
regBankSelected: false
|
|
liveins:
|
|
body: |
|
|
bb.0:
|
|
|
|
; X64-LABEL: name: test_memop_s64
|
|
; X64: [[DEF:%[0-9]+]]:_(p0) = IMPLICIT_DEF
|
|
; X64: [[LOAD:%[0-9]+]]:_(s64) = G_LOAD [[DEF]](p0) :: (load 8)
|
|
; X64: G_STORE [[LOAD]](s64), [[DEF]](p0) :: (store 8)
|
|
%0:_(p0) = IMPLICIT_DEF
|
|
%1:_(s64) = G_LOAD %0 :: (load 8)
|
|
|
|
G_STORE %1, %0 :: (store 8)
|
|
|
|
...
|