• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llc -mtriple=x86_64-- -run-pass=peephole-opt %s -o - | FileCheck %s
2--- |
3  define void @func() { ret void }
4...
5---
6# Check that instructions with MI.isBitcast() are only replaced by COPY if there
7# are no SUBREG_TO_REG users.
8# CHECK-LABEL: name: func
9name: func
10registers:
11  - { id: 0, class: gr32 }
12  - { id: 1, class: fr32 }
13  - { id: 2, class: gr32 }
14
15  - { id: 3, class: gr32 }
16  - { id: 4, class: fr32 }
17  - { id: 5, class: gr32 }
18  - { id: 6, class: gr64 }
19
20body: |
21  bb.0:
22    ; CHECK: %1:fr32 = VMOVDI2SSrr %0
23    ; CHECK: %7:gr32 = COPY %0
24    ; CHECK: NOOP implicit %7
25    %0 = MOV32ri 42
26    %1 = VMOVDI2SSrr %0
27    %2 = MOVSS2DIrr %1
28    NOOP implicit %2
29
30    ; CHECK: %4:fr32 = VMOVDI2SSrr %3
31    ; CHECK-NOT: COPY
32    ; CHECK: %5:gr32 = MOVSS2DIrr %4
33    ; CHECK: %6:gr64 = SUBREG_TO_REG %5, 0
34    ; CHECK: NOOP implicit %6
35    %3 = MOV32ri 42
36    %4 = VMOVDI2SSrr %3
37    %5 = MOVSS2DIrr %4
38    %6 = SUBREG_TO_REG %5, 0, %subreg.sub_32bit
39    NOOP implicit %6
40...
41