# RUN: llc %s -mtriple=loongarch64 -start-after=prologepilog -O0 -filetype=obj -o - \ # RUN: | extract-section .text \ # RUN: | FileCheck %s -check-prefix=CHECK-ENC # RUN: llc %s -mtriple=loongarch64 -start-after=prologepilog -O0 -filetype=asm -o - \ # RUN: | FileCheck %s -check-prefix=CHECK-ASM # ------------------------------------------------------------------------------------------------- # Encoding format: 3RI2 # ------------------------------------------------------------------------------------------------- # ---------------------------------------------+-----+--------------+--------------+--------------- # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 # ---------------------------------------------+-----+--------------+--------------+--------------- # opcode |imm2 | rk | rj | rd # ---------------------------------------------+-----+--------------+--------------+--------------- --- # CHECK-LABEL: test_ALSL_W: # CHECK-ENC: 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 1 1 0 0 0 1 0 1 0 0 1 0 0 # CHECK-ASM: alsl.w $a0, $a1, $a2, 4 name: test_ALSL_W body: | bb.0: $r4 = ALSL_W $r5, $r6, 4 ... --- # CHECK-LABEL: test_ALSL_WU: # CHECK-ENC: 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 1 1 0 0 0 1 0 1 0 0 1 0 0 # CHECK-ASM: alsl.wu $a0, $a1, $a2, 2 name: test_ALSL_WU body: | bb.0: $r4 = ALSL_WU $r5, $r6, 2 ... --- # CHECK-LABEL: test_ALSL_D: # CHECK-ENC: 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 1 0 0 1 1 0 0 0 1 0 1 0 0 1 0 0 # CHECK-ASM: alsl.d $a0, $a1, $a2, 4 name: test_ALSL_D body: | bb.0: $r4 = ALSL_D $r5, $r6, 4 ... --- # CHECK-LABEL: test_BYTEPICK_W: # CHECK-ENC: 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 0 1 0 0 1 0 0 # CHECK-ASM: bytepick.w $a0, $a1, $a2, 0 name: test_BYTEPICK_W body: | bb.0: $r4 = BYTEPICK_W $r5, $r6, 0 ... # ------------------------------------------------------------------------------------------------- # Encoding format: 3RI3 # ------------------------------------------------------------------------------------------------- # ------------------------------------------+--------+--------------+--------------+--------------- # 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 # ------------------------------------------+--------+--------------+--------------+--------------- # opcode | imm3 | rk | rj | rd # ------------------------------------------+--------+--------------+--------------+--------------- --- # CHECK-LABEL: test_BYTEPICK_D: # CHECK-ENC: 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 0 0 0 1 0 1 0 0 1 0 0 # CHECK-ASM: bytepick.d $a0, $a1, $a2, 4 name: test_BYTEPICK_D body: | bb.0: $r4 = BYTEPICK_D $r5, $r6, 4