brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.7 KiB · 9ff4f7e Raw
67 lines · plain
1// RUN: llvm-mc -triple=amdgcn -mcpu=tahiti -show-encoding %s | FileCheck %s --check-prefix=SICI2// RUN: llvm-mc -triple=amdgcn -mcpu=tonga -show-encoding %s | FileCheck %s --check-prefix=VI3 4//===----------------------------------------------------------------------===//5// Generic Checks6//===----------------------------------------------------------------------===//7 8// src0 sgpr9v_cmp_lt_f32 vcc, s2, v410// SICI: v_cmp_lt_f32_e32 vcc, s2, v4 ; encoding: [0x02,0x08,0x02,0x7c]11// VI:   v_cmp_lt_f32_e32 vcc, s2, v4 ; encoding: [0x02,0x08,0x82,0x7c]12 13// src0 inline immediate14v_cmp_lt_f32 vcc, 0, v415// SICI: v_cmp_lt_f32_e32 vcc, 0, v4 ; encoding: [0x80,0x08,0x02,0x7c]16// VI:   v_cmp_lt_f32_e32 vcc, 0, v4 ; encoding: [0x80,0x08,0x82,0x7c]17 18// src0 literal19v_cmp_lt_f32 vcc, 10.0, v420// SICI: v_cmp_lt_f32_e32 vcc, 0x41200000, v4 ; encoding: [0xff,0x08,0x02,0x7c,0x00,0x00,0x20,0x41]21// VI:   v_cmp_lt_f32_e32 vcc, 0x41200000, v4 ; encoding: [0xff,0x08,0x82,0x7c,0x00,0x00,0x20,0x41]22 23// src0, src1 max vgpr24v_cmp_lt_f32 vcc, v255, v25525// SICI: v_cmp_lt_f32_e32 vcc, v255, v255 ; encoding: [0xff,0xff,0x03,0x7c]26// VI:   v_cmp_lt_f32_e32 vcc, v255, v255 ; encoding: [0xff,0xff,0x83,0x7c]27 28// force 32-bit encoding29v_cmp_lt_f32_e32 vcc, v2, v430// SICI: v_cmp_lt_f32_e32 vcc, v2, v4 ; encoding: [0x02,0x09,0x02,0x7c]31// VI:   v_cmp_lt_f32_e32 vcc, v2, v4 ; encoding: [0x02,0x09,0x82,0x7c]32 33 34//===----------------------------------------------------------------------===//35// Instructions36//===----------------------------------------------------------------------===//37 38v_cmp_f_f32 vcc, v2, v439// SICI: v_cmp_f_f32_e32 vcc, v2, v4 ; encoding: [0x02,0x09,0x00,0x7c]40// VI:   v_cmp_f_f32_e32 vcc, v2, v4 ; encoding: [0x02,0x09,0x80,0x7c]41 42v_cmp_lt_f32 vcc, v2, v443// SICI: v_cmp_lt_f32_e32 vcc, v2, v4 ; encoding: [0x02,0x09,0x02,0x7c]44// VI:   v_cmp_lt_f32_e32 vcc, v2, v4 ; encoding: [0x02,0x09,0x82,0x7c]45 46// TODO: Add tests for the rest of v_cmp_*_f3247// TODO: Add tests for v_cmpx_*_f3248 49v_cmp_f_f64 vcc, v[2:3], v[4:5]50// SICI: v_cmp_f_f64_e32 vcc, v[2:3], v[4:5] ; encoding: [0x02,0x09,0x40,0x7c]51// VI:   v_cmp_f_f64_e32 vcc, v[2:3], v[4:5] ; encoding: [0x02,0x09,0xc0,0x7c]52 53// TODO: Add tests for the rest of v_cmp_*_f6454// TODO: Add tests for the rest of the floating-point comparision instructions.55 56v_cmp_f_i32 vcc, v2, v457// SICI: v_cmp_f_i32_e32 vcc, v2, v4 ; encoding: [0x02,0x09,0x00,0x7d]58// VI:   v_cmp_f_i32_e32 vcc, v2, v4 ; encoding: [0x02,0x09,0x80,0x7d]59 60// TODO: Add test for the rest of v_cmp_*_i3261 62v_cmp_f_i64 vcc, v[2:3], v[4:5]63// SICI: v_cmp_f_i64_e32 vcc, v[2:3], v[4:5] ; encoding: [0x02,0x09,0x40,0x7d]64// VI:   v_cmp_f_i64_e32 vcc, v[2:3], v[4:5] ; encoding: [0x02,0x09,0xc0,0x7d]65 66// TODO: Add tests for the rest of the instructions.67