1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -mtriple=i386-linux-gnu -run-pass=legalizer %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=X32 3# RUN: llc -mtriple=x86_64-linux-gnu -run-pass=legalizer %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=X64 4--- | 5 define void @trunc_check() { 6 ret void 7 } 8 9... 10--- 11name: trunc_check 12registers: 13 - { id: 0, class: _ } 14 - { id: 1, class: _ } 15 - { id: 2, class: _ } 16 - { id: 3, class: _ } 17body: | 18 bb.1 (%ir-block.0): 19 ; X32-LABEL: name: trunc_check 20 ; X32: [[DEF:%[0-9]+]]:_(s32) = IMPLICIT_DEF 21 ; X32: [[DEF1:%[0-9]+]]:_(p0) = G_IMPLICIT_DEF 22 ; X32: [[C:%[0-9]+]]:_(s8) = G_CONSTANT i8 1 23 ; X32: [[TRUNC:%[0-9]+]]:_(s8) = G_TRUNC [[DEF]](s32) 24 ; X32: [[AND:%[0-9]+]]:_(s8) = G_AND [[TRUNC]], [[C]] 25 ; X32: G_STORE [[AND]](s8), [[DEF1]](p0) :: (store 1) 26 ; X32: [[TRUNC1:%[0-9]+]]:_(s8) = G_TRUNC [[DEF]](s32) 27 ; X32: G_STORE [[TRUNC1]](s8), [[DEF1]](p0) :: (store 8) 28 ; X32: [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[DEF]](s32) 29 ; X32: G_STORE [[TRUNC2]](s16), [[DEF1]](p0) :: (store 16) 30 ; X32: RET 0 31 ; X64-LABEL: name: trunc_check 32 ; X64: [[DEF:%[0-9]+]]:_(s32) = IMPLICIT_DEF 33 ; X64: [[DEF1:%[0-9]+]]:_(p0) = G_IMPLICIT_DEF 34 ; X64: [[C:%[0-9]+]]:_(s8) = G_CONSTANT i8 1 35 ; X64: [[TRUNC:%[0-9]+]]:_(s8) = G_TRUNC [[DEF]](s32) 36 ; X64: [[AND:%[0-9]+]]:_(s8) = G_AND [[TRUNC]], [[C]] 37 ; X64: G_STORE [[AND]](s8), [[DEF1]](p0) :: (store 1) 38 ; X64: [[TRUNC1:%[0-9]+]]:_(s8) = G_TRUNC [[DEF]](s32) 39 ; X64: G_STORE [[TRUNC1]](s8), [[DEF1]](p0) :: (store 8) 40 ; X64: [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[DEF]](s32) 41 ; X64: G_STORE [[TRUNC2]](s16), [[DEF1]](p0) :: (store 16) 42 ; X64: RET 0 43 %0(s32) = IMPLICIT_DEF 44 %1(s1) = G_TRUNC %0(s32) 45 %4:_(p0) = G_IMPLICIT_DEF 46 G_STORE %1, %4 :: (store 1) 47 48 %2(s8) = G_TRUNC %0(s32) 49 G_STORE %2, %4 :: (store 8) 50 51 %3(s16) = G_TRUNC %0(s32) 52 G_STORE %3, %4 :: (store 16) 53 RET 0 54 55... 56