File: sext_elimination.mir

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (67 lines) | stat: -rw-r--r-- 1,825 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# RUN: llc -run-pass ppc-mi-peepholes -ppc-eliminate-signext -ppc-eliminate-zeroext -verify-machineinstrs -o - %s | FileCheck %s

--- |
  target datalayout = "E-m:e-i64:64-n32:64"
  target triple = "powerpc64le-unknown-linux-gnu"
  define ptr @func(ptr %a) {
  entry:
    ret ptr %a
  }
  
...
---
name:            func
alignment:       4
exposesReturnsTwice: false
legalized:       false
regBankSelected: false
selected:        false
tracksRegLiveness: true
liveins:
  - { reg: '$x3', virtual-reg: '%0' }
frameInfo:
  isFrameAddressTaken: false
  isReturnAddressTaken: false
  hasStackMap:     false
  hasPatchPoint:   false
  stackSize:       0
  offsetAdjustment: 0
  maxAlignment:    0
  adjustsStack:    false
  hasCalls:        false
  maxCallFrameSize: 0
  hasOpaqueSPAdjustment: false
  hasVAStart:      false
  hasMustTailInVarArgFunc: false
body:             |
  bb.0.entry:
    liveins: $x3

    ; CHECK-LABEL: bb.0.entry:
    ; CHECK: %4:g8rc = EXTSW_32_64 killed %3
    ; CHECK: %5:g8rc = INSERT_SUBREG %15, %1, %subreg.sub_32
    ; CHECK: %7:g8rc = EXTSW_32_64 killed %6
    ; CHECK: %9:g8rc = INSERT_SUBREG %16, %8, %subreg.sub_32
    ; CHECK: %11:g8rc = INSERT_SUBREG %17, %10, %subreg.sub_32
    ; CHECK: %14:g8rc = COPY killed %13

    %0:g8rc_nox0 = COPY $x3
    %1:gprc, %2:g8rc_nox0 = LBZU 0, %0:g8rc_nox0
    %3:gprc = COPY %2:g8rc_nox0
    %4:g8rc = EXTSW_32_64 %3:gprc ; should not be eliminated
    %5:g8rc = EXTSW_32_64 %1:gprc

    %6:gprc = ORIS %1:gprc, 32768 ; should not be eliminated
    %7:g8rc = EXTSW_32_64 %6:gprc

    %8:gprc = ORIS %1:gprc, 32767
    %9:g8rc = EXTSW_32_64 %8:gprc

    %10:gprc = ORI %1:gprc, 32768
    %11:g8rc = EXTSW_32_64 %10:gprc

    %12:g8rc = IMPLICIT_DEF
    %13:g8rc = INSERT_SUBREG %12:g8rc, %1:gprc, %subreg.sub_32
    %14:g8rc = RLDICL %13:g8rc, 0, 32

...