1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 2
2 # RUN: llc -mtriple=i386-linux-gnu -run-pass=legalizer %s -o - | FileCheck %s --check-prefix=X86-32
4 # test constant fold barrier
11 ; X86-32-LABEL: name: test_fold64
12 ; X86-32: [[DEF:%[0-9]+]]:_(s64) = IMPLICIT_DEF
13 ; X86-32-NEXT: [[CONSTANT_FOLD_BARRIER:%[0-9]+]]:_(s64) = G_CONSTANT_FOLD_BARRIER [[DEF]]
14 ; X86-32-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY [[CONSTANT_FOLD_BARRIER]](s64)
15 ; X86-32-NEXT: RET 0, implicit [[COPY]](s64)
16 %0:_(s64) = IMPLICIT_DEF
17 %1:_(s64) = G_CONSTANT_FOLD_BARRIER %0
18 %2:_(s64) = COPY %1(s64)
26 ; X86-32-LABEL: name: test_fold32
27 ; X86-32: [[DEF:%[0-9]+]]:_(s32) = IMPLICIT_DEF
28 ; X86-32-NEXT: [[CONSTANT_FOLD_BARRIER:%[0-9]+]]:_(s32) = G_CONSTANT_FOLD_BARRIER [[DEF]]
29 ; X86-32-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY [[CONSTANT_FOLD_BARRIER]](s32)
30 ; X86-32-NEXT: RET 0, implicit [[COPY]](s32)
31 %0:_(s32) = IMPLICIT_DEF
32 %1:_(s32) = G_CONSTANT_FOLD_BARRIER %0
33 %2:_(s32) = COPY %1(s32)
41 ; X86-32-LABEL: name: test_fold16
42 ; X86-32: [[DEF:%[0-9]+]]:_(s16) = IMPLICIT_DEF
43 ; X86-32-NEXT: [[CONSTANT_FOLD_BARRIER:%[0-9]+]]:_(s16) = G_CONSTANT_FOLD_BARRIER [[DEF]]
44 ; X86-32-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY [[CONSTANT_FOLD_BARRIER]](s16)
45 ; X86-32-NEXT: RET 0, implicit [[COPY]](s16)
46 %0:_(s16) = IMPLICIT_DEF
47 %1:_(s16) = G_CONSTANT_FOLD_BARRIER %0
48 %2:_(s16) = COPY %1(s16)
56 ; X86-32-LABEL: name: test_fold8
57 ; X86-32: [[DEF:%[0-9]+]]:_(s8) = IMPLICIT_DEF
58 ; X86-32-NEXT: [[CONSTANT_FOLD_BARRIER:%[0-9]+]]:_(s8) = G_CONSTANT_FOLD_BARRIER [[DEF]]
59 ; X86-32-NEXT: [[COPY:%[0-9]+]]:_(s8) = COPY [[CONSTANT_FOLD_BARRIER]](s8)
60 ; X86-32-NEXT: RET 0, implicit [[COPY]](s8)
61 %0:_(s8) = IMPLICIT_DEF
62 %1:_(s8) = G_CONSTANT_FOLD_BARRIER %0
63 %2:_(s8) = COPY %1(s8)