File: pr51903.mir

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (108 lines) | stat: -rw-r--r-- 4,699 bytes parent folder | download | duplicates (14)
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc %s -o - -mtriple=x86_64-unknown-linux-gnu -run-pass=x86-flags-copy-lowering -verify-machineinstrs | FileCheck %s

--- |
  ; ModuleID = 'bugpoint-reduced-simplified.ll'
  source_filename = "test.c"
  target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
  target triple = "x86_64-unknown-linux-gnu"

  @a = external global i32, align 4

  declare void @e()

  define void @f() {
  entry:
    br label %for.body

  for.body:                                         ; preds = %for.body, %entry
    %0 = load i32, ptr @a, align 4
    %conv = sext i32 %0 to i64
    %1 = load i64, ptr undef, align 8
    %or = or i64 %1, %conv
    store i64 %or, ptr undef, align 8
    call void @e()
    %cmp4 = icmp eq i64 %or, 0
    %conv5 = zext i1 %cmp4 to i32
    %conv6 = trunc i32 %conv5 to i8
    store i8 %conv6, ptr undef, align 1
    %conv7 = sext i8 %conv6 to i32
    %bf.cast = trunc i40 undef to i32
    %xor = xor i32 %conv7, %bf.cast
    %conv8 = sext i32 %xor to i64
    store i64 %conv8, ptr undef, align 8
    br label %for.body
  }

...
---
name:            f
alignment:       16
tracksRegLiveness: true
registers:
  - { id: 0, class: gr64 }
  - { id: 1, class: gr64 }
  - { id: 2, class: gr32 }
  - { id: 3, class: gr64 }
  - { id: 4, class: gr32 }
  - { id: 5, class: gr32 }
  - { id: 6, class: gr32 }
  - { id: 7, class: gr64 }
  - { id: 8, class: gr64 }
  - { id: 9, class: gr64 }
  - { id: 10, class: gr64 }
  - { id: 11, class: gr8 }
  - { id: 12, class: gr64 }
frameInfo:
  maxAlignment:    1
  hasCalls:        true
machineFunctionInfo: {}
body:             |
  ; CHECK-LABEL: name: f
  ; CHECK: bb.0.entry:
  ; CHECK:   successors: %bb.1(0x80000000)
  ; CHECK:   JMP_1 %bb.1
  ; CHECK: bb.1.for.body:
  ; CHECK:   successors: %bb.1(0x80000000)
  ; CHECK:   [[MOV64rm:%[0-9]+]]:gr64 = MOV64rm $rip, 1, $noreg, target-flags(x86-gotpcrel) @a, $noreg :: (load (s64) from got)
  ; CHECK:   [[MOVSX64rm32_:%[0-9]+]]:gr64 = MOVSX64rm32 killed [[MOV64rm]], 1, $noreg, 0, $noreg :: (dereferenceable load (s32) from @a)
  ; CHECK:   [[DEF:%[0-9]+]]:gr64 = IMPLICIT_DEF
  ; CHECK:   OR64mr [[DEF]], 1, $noreg, 0, $noreg, [[MOVSX64rm32_]], implicit-def $eflags :: (store (s64) into `ptr undef`), (load (s64) from `ptr undef`)
  ; CHECK:   [[SETCCr:%[0-9]+]]:gr8 = SETCCr 4, implicit $eflags
  ; CHECK:   ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
  ; CHECK:   CALL64pcrel32 target-flags(x86-plt) @e, csr_64, implicit $rsp, implicit $ssp, implicit-def $rsp, implicit-def $ssp
  ; CHECK:   ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
  ; CHECK:   [[MOVZX32rr8_:%[0-9]+]]:gr32 = MOVZX32rr8 [[SETCCr]]
  ; CHECK:   [[DEF1:%[0-9]+]]:gr64 = IMPLICIT_DEF
  ; CHECK:   MOV8mr [[DEF1]], 1, $noreg, 0, $noreg, [[SETCCr]] :: (store (s8) into `ptr undef`)
  ; CHECK:   [[DEF2:%[0-9]+]]:gr32 = IMPLICIT_DEF
  ; CHECK:   [[XOR32rr:%[0-9]+]]:gr32 = XOR32rr [[MOVZX32rr8_]], [[DEF2]], implicit-def $eflags
  ; CHECK:   [[MOVSX64rr32_:%[0-9]+]]:gr64 = MOVSX64rr32 [[XOR32rr]]
  ; CHECK:   [[DEF3:%[0-9]+]]:gr64 = IMPLICIT_DEF
  ; CHECK:   MOV64mr [[DEF3]], 1, $noreg, 0, $noreg, [[MOVSX64rr32_]] :: (store (s64) into `ptr undef`)
  ; CHECK:   JMP_1 %bb.1
  bb.0.entry:
    JMP_1 %bb.1

  bb.1.for.body:
    %7:gr64 = MOV64rm $rip, 1, $noreg, target-flags(x86-gotpcrel) @a, $noreg :: (load (s64) from got)
    %8:gr64 = MOVSX64rm32 killed %7, 1, $noreg, 0, $noreg :: (dereferenceable load (s32) from @a)
    %9:gr64 = IMPLICIT_DEF
    OR64mr %9, 1, $noreg, 0, $noreg, %8, implicit-def $eflags :: (store (s64) into `ptr undef`), (load (s64) from `ptr undef`)
    %10:gr64 = COPY $eflags
    ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
    CALL64pcrel32 target-flags(x86-plt) @e, csr_64, implicit $rsp, implicit $ssp, implicit-def $rsp, implicit-def $ssp
    ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
    $eflags = COPY %10
    %11:gr8 = SETCCr 4, implicit $eflags
    %4:gr32 = MOVZX32rr8 killed %11
    %12:gr64 = IMPLICIT_DEF
    SETCCm %12, 1, $noreg, 0, $noreg, 4, implicit $eflags :: (store (s8) into `ptr undef`)
    %5:gr32 = IMPLICIT_DEF
    %6:gr32 = XOR32rr %4, %5, implicit-def $eflags
    %3:gr64 = MOVSX64rr32 %6
    %0:gr64 = IMPLICIT_DEF
    MOV64mr %0, 1, $noreg, 0, $noreg, %3 :: (store (s64) into `ptr undef`)
    JMP_1 %bb.1

...