File: select-add-x32.mir

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (53 lines) | stat: -rw-r--r-- 1,723 bytes parent folder | download | duplicates (21)
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
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=i386-linux-gnu -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=X32
--- |
  define i64 @test_add_i64(i64 %a, i64 %b) {
    %r = add i64 %a, %b
    ret i64 %r
  }

...
---
name:            test_add_i64
alignment:       16
legalized:       true
regBankSelected: true
registers:
  - { id: 0, class: gpr }
  - { id: 1, class: gpr }
  - { id: 2, class: gpr }
  - { id: 3, class: gpr }
  - { id: 4, class: gpr }
  - { id: 5, class: gpr }
  - { id: 6, class: gpr }
  - { id: 7, class: gpr }
  - { id: 8, class: gpr }
  - { id: 9, class: gpr }
body:             |
  bb.0 (%ir-block.0):
    ; X32-LABEL: name: test_add_i64
    ; X32: [[DEF:%[0-9]+]]:gr32 = IMPLICIT_DEF
    ; X32: [[DEF1:%[0-9]+]]:gr32 = IMPLICIT_DEF
    ; X32: [[DEF2:%[0-9]+]]:gr32 = IMPLICIT_DEF
    ; X32: [[DEF3:%[0-9]+]]:gr32 = IMPLICIT_DEF
    ; X32: [[ADD32rr:%[0-9]+]]:gr32 = ADD32rr [[DEF]], [[DEF2]], implicit-def $eflags
    ; X32: [[COPY:%[0-9]+]]:gr32 = COPY $eflags
    ; X32: $eflags = COPY [[COPY]]
    ; X32: [[ADC32rr:%[0-9]+]]:gr32 = ADC32rr [[DEF1]], [[DEF3]], implicit-def $eflags, implicit $eflags
    ; X32: [[COPY1:%[0-9]+]]:gr32 = COPY $eflags
    ; X32: $eax = COPY [[ADD32rr]]
    ; X32: $edx = COPY [[ADC32rr]]
    ; X32: RET 0, implicit $eax, implicit $edx
    %0(s32) = IMPLICIT_DEF
    %1(s32) = IMPLICIT_DEF
    %2(s32) = IMPLICIT_DEF
    %3(s32) = IMPLICIT_DEF
    %9(s8) = G_CONSTANT i8 0
    %4(s1) = G_TRUNC %9(s8)
    %5(s32), %6(s1) = G_UADDE %0, %2, %4
    %7(s32), %8(s1) = G_UADDE %1, %3, %6
    $eax = COPY %5(s32)
    $edx = COPY %7(s32)
    RET 0, implicit $eax, implicit $edx

...