42 lines
1.2 KiB
Text
42 lines
1.2 KiB
Text
|
# 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
|
||
|
|
||
|
...
|