File: ctpop-rv64.mir

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,998,492 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 (41 lines) | stat: -rw-r--r-- 1,197 bytes parent folder | download | duplicates (7)
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
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=riscv64 -mattr=+zbb -run-pass=instruction-select \
# RUN:   -simplify-mir -verify-machineinstrs %s -o - \
# RUN:   | FileCheck -check-prefix=RV64I %s

---
name:            ctpop_s32
legalized:       true
regBankSelected: true
body:             |
  bb.0.entry:
    ; RV64I-LABEL: name: ctpop_s32
    ; RV64I: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; RV64I-NEXT: [[CPOPW:%[0-9]+]]:gpr = CPOPW [[COPY]]
    ; RV64I-NEXT: $x10 = COPY [[CPOPW]]
    ; RV64I-NEXT: PseudoRET implicit $x10
    %0:gprb(s64) = COPY $x10
    %1:gprb(s32) = G_TRUNC %0
    %2:gprb(s32) = G_CTPOP %1
    %3:gprb(s64) = G_ANYEXT %2
    $x10 = COPY %3(s64)
    PseudoRET implicit $x10

...
---
name:            ctpop_s64
legalized:       true
regBankSelected: true
body:             |
  bb.0.entry:
    ; RV64I-LABEL: name: ctpop_s64
    ; RV64I: [[COPY:%[0-9]+]]:gpr = COPY $x10
    ; RV64I-NEXT: [[CPOP:%[0-9]+]]:gpr = CPOP [[COPY]]
    ; RV64I-NEXT: $x10 = COPY [[CPOP]]
    ; RV64I-NEXT: PseudoRET implicit $x10
    %0:gprb(s64) = COPY $x10
    %1:gprb(s64) = G_CTPOP %0
    $x10 = COPY %1(s64)
    PseudoRET implicit $x10

...