brintos

brintos / llvm-project-archived public Read only

0
0
Text · 10.1 KiB · aa71e4d Raw
144 lines · plain
1// RUN: not llvm-mc -triple=amdgcn -mcpu=gfx1200 %s 2>&1 | FileCheck %s -check-prefix=GFX12 --implicit-check-not=error: --strict-whitespace2 3//===----------------------------------------------------------------------===//4// A VOPD instruction can use only one literal.5//===----------------------------------------------------------------------===//6 7v_dual_mul_f32      v11, 0x24681357, v2          ::  v_dual_mul_f32      v10, 0xbabe, v58// GFX12: :[[@LINE-1]]:{{[0-9]+}}: error: only one unique literal operand is allowed9// GFX12-NEXT:{{^}}v_dual_mul_f32      v11, 0x24681357, v2          ::  v_dual_mul_f32      v10, 0xbabe, v510// GFX12-NEXT:{{^}}                                                                              ^11 12//===----------------------------------------------------------------------===//13// When 2 different literals are specified, show the location14// of the last literal which is not a KImm, if any.15//===----------------------------------------------------------------------===//16 17v_dual_fmamk_f32    v122, v74, 0xa0172923, v161  ::  v_dual_lshlrev_b32  v247, 0xbabe, v9918// GFX12: :[[@LINE-1]]:{{[0-9]+}}: error: only one unique literal operand is allowed19// GFX12-NEXT:{{^}}v_dual_fmamk_f32    v122, v74, 0xa0172923, v161  ::  v_dual_lshlrev_b32  v247, 0xbabe, v9920// GFX12-NEXT:{{^}}                                                                               ^21 22v_dual_add_f32      v5, 0xaf123456, v2           ::  v_dual_fmaak_f32     v6, v3, v1, 0xbabe23// GFX12: :[[@LINE-1]]:{{[0-9]+}}: error: only one unique literal operand is allowed24// GFX12-NEXT:{{^}}v_dual_add_f32      v5, 0xaf123456, v2           ::  v_dual_fmaak_f32     v6, v3, v1, 0xbabe25// GFX12-NEXT:{{^}}                                                                                      ^26 27v_dual_add_f32      v5, 0xaf123456, v2           ::  v_dual_fmaak_f32     v6, 0xbabe, v1, 0xbabe28// GFX12: :[[@LINE-1]]:{{[0-9]+}}: error: only one unique literal operand is allowed29// GFX12-NEXT:{{^}}v_dual_add_f32      v5, 0xaf123456, v2           ::  v_dual_fmaak_f32     v6, 0xbabe, v1, 0xbabe30// GFX12-NEXT:{{^}}                                                                              ^31 32v_dual_fmamk_f32    v122, 0xdeadbeef, 0xdeadbeef, v161 ::  v_dual_fmamk_f32  v123, 0xdeadbeef, 0x1234, v16233// GFX12: :[[@LINE-1]]:{{[0-9]+}}: error: only one unique literal operand is allowed34// GFX12-NEXT:{{^}}v_dual_fmamk_f32    v122, 0xdeadbeef, 0xdeadbeef, v161 ::  v_dual_fmamk_f32  v123, 0xdeadbeef, 0x1234, v16235// GFX12-NEXT:{{^}}                                                                                               ^36 37v_dual_fmamk_f32    v122, 0xdeadbeef, 0xdeadbeef, v161 ::  v_dual_fmamk_f32  v123, s0, 0x1234, v16238// GFX12: :[[@LINE-1]]:{{[0-9]+}}: error: only one unique literal operand is allowed39// GFX12-NEXT:{{^}}v_dual_fmamk_f32    v122, 0xdeadbeef, 0xdeadbeef, v161 ::  v_dual_fmamk_f32  v123, s0, 0x1234, v16240// GFX12-NEXT:{{^}}                                                                                       ^41 42//===----------------------------------------------------------------------===//43// Check that assembler detects a different literal regardless of its location.44//===----------------------------------------------------------------------===//45 46v_dual_fmamk_f32    v122, 0xdeadbeef, 0xdeadbeef, v161 ::  v_dual_fmamk_f32  v123, 0xdeadbeef, 0x1234, v16247// GFX12: :[[@LINE-1]]:{{[0-9]+}}: error: only one unique literal operand is allowed48// GFX12-NEXT:{{^}}v_dual_fmamk_f32    v122, 0xdeadbeef, 0xdeadbeef, v161 ::  v_dual_fmamk_f32  v123, 0xdeadbeef, 0x1234, v16249// GFX12-NEXT:{{^}}                                                                                               ^50 51v_dual_fmamk_f32    v122, 0xdeadbeef, 0xdeadbeef, v161 ::  v_dual_fmamk_f32  v123, 0x1234, 0xdeadbeef, v16252// GFX12: :[[@LINE-1]]:{{[0-9]+}}: error: only one unique literal operand is allowed53// GFX12-NEXT:{{^}}v_dual_fmamk_f32    v122, 0xdeadbeef, 0xdeadbeef, v161 ::  v_dual_fmamk_f32  v123, 0x1234, 0xdeadbeef, v16254// GFX12-NEXT:{{^}}                                                                                   ^55 56v_dual_fmamk_f32    v122, 0xdeadbeef, 0x1234, v161     ::  v_dual_fmamk_f32  v123, 0xdeadbeef, 0xdeadbeef, v16257// GFX12: :[[@LINE-1]]:{{[0-9]+}}: error: only one unique literal operand is allowed58// GFX12-NEXT:{{^}}v_dual_fmamk_f32    v122, 0xdeadbeef, 0x1234, v161     ::  v_dual_fmamk_f32  v123, 0xdeadbeef, 0xdeadbeef, v16259// GFX12-NEXT:{{^}}                                      ^60 61v_dual_fmamk_f32    v122, 0x1234, 0xdeadbeef, v161     ::  v_dual_fmamk_f32  v123, 0xdeadbeef, 0xdeadbeef, v16262// GFX12: :[[@LINE-1]]:{{[0-9]+}}: error: only one unique literal operand is allowed63// GFX12-NEXT:{{^}}v_dual_fmamk_f32    v122, 0x1234, 0xdeadbeef, v161     ::  v_dual_fmamk_f32  v123, 0xdeadbeef, 0xdeadbeef, v16264// GFX12-NEXT:{{^}}                                                                                   ^65 66//===----------------------------------------------------------------------===//67// When 2 different literals are specified and all literals are KImm,68// show the location of the last KImm literal.69//===----------------------------------------------------------------------===//70 71v_dual_fmamk_f32    v122, s0, 0xdeadbeef, v161   ::  v_dual_fmamk_f32  v123, s0, 0x1234, v16272// GFX12: :[[@LINE-1]]:{{[0-9]+}}: error: only one unique literal operand is allowed73// GFX12-NEXT:{{^}}v_dual_fmamk_f32    v122, s0, 0xdeadbeef, v161   ::  v_dual_fmamk_f32  v123, s0, 0x1234, v16274// GFX12-NEXT:{{^}}                                                                                 ^75 76//===----------------------------------------------------------------------===//77// A VOPD instruction cannot use more than 2 scalar operands78//===----------------------------------------------------------------------===//79 80// 2 different SGPRs + LITERAL81 82v_dual_fmaak_f32    v122, s74, v161, 2.741       ::  v_dual_and_b32       v247, s75, v9883// GFX12: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)84// GFX12-NEXT:{{^}}v_dual_fmaak_f32    v122, s74, v161, 2.741       ::  v_dual_and_b32       v247, s75, v9885// GFX12-NEXT:{{^}}                                                                                ^86 87v_dual_mov_b32      v247, s73                    ::  v_dual_fmaak_f32     v122, s74, v161, 2.74188// GFX12: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)89// GFX12-NEXT:{{^}}v_dual_mov_b32      v247, s73                    ::  v_dual_fmaak_f32     v122, s74, v161, 2.74190// GFX12-NEXT:{{^}}                                                                                ^91 92v_dual_fmamk_f32    v122, s0, 0xbabe, v161       ::  v_dual_fmamk_f32     v123, s1, 0xbabe, v16293// GFX12: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)94// GFX12-NEXT:{{^}}v_dual_fmamk_f32    v122, s0, 0xbabe, v161       ::  v_dual_fmamk_f32     v123, s1, 0xbabe, v16295// GFX12-NEXT:{{^}}                                                                                ^96 97// 2 different SGPRs + VCC98 99v_dual_add_f32      v255, s1, v2                 ::  v_dual_cndmask_b32   v6, s2, v3100// GFX12: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)101// GFX12-NEXT:{{^}}v_dual_add_f32      v255, s1, v2                 ::  v_dual_cndmask_b32   v6, s2, v3102// GFX12-NEXT:{{^}}                                                                              ^103 104v_dual_cndmask_b32   v6, s1, v3                  ::  v_dual_add_f32       v255, s2, v2105// GFX12: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)106// GFX12-NEXT:{{^}}v_dual_cndmask_b32   v6, s1, v3                  ::  v_dual_add_f32       v255, s2, v2107// GFX12-NEXT:{{^}}                                                                                ^108 109v_dual_cndmask_b32  v255, s1, v2                 ::  v_dual_cndmask_b32   v6, s2, v3110// GFX12: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)111// GFX12-NEXT:{{^}}v_dual_cndmask_b32  v255, s1, v2                 ::  v_dual_cndmask_b32   v6, s2, v3112// GFX12-NEXT:{{^}}                                                                              ^113 114// SGPR + LITERAL + VCC115 116v_dual_cndmask_b32  v255, s1, v2                 ::  v_dual_mov_b32       v254, 0xbabe117// GFX12: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)118// GFX12-NEXT:{{^}}v_dual_cndmask_b32  v255, s1, v2                 ::  v_dual_mov_b32       v254, 0xbabe119// GFX12-NEXT:{{^}}                                                                                ^120 121v_dual_cndmask_b32  v255, 0xbabe, v2             ::  v_dual_mov_b32       v254, s1122// GFX12: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)123// GFX12-NEXT:{{^}}v_dual_cndmask_b32  v255, 0xbabe, v2             ::  v_dual_mov_b32       v254, s1124// GFX12-NEXT:{{^}}                                                                                ^125 126v_dual_cndmask_b32  v255, s3, v2                 ::  v_dual_fmamk_f32     v254, v1, 0xbabe, v162127// GFX12: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)128// GFX12-NEXT:{{^}}v_dual_cndmask_b32  v255, s3, v2                 ::  v_dual_fmamk_f32     v254, v1, 0xbabe, v162129// GFX12-NEXT:{{^}}                          ^130 131v_dual_cndmask_b32  v255, v1, v2                 ::  v_dual_fmamk_f32     v254, s3, 0xbabe, v162132// GFX12: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)133// GFX12-NEXT:{{^}}v_dual_cndmask_b32  v255, v1, v2                 ::  v_dual_fmamk_f32     v254, s3, 0xbabe, v162134// GFX12-NEXT:{{^}}                                                                                ^135 136// SGPR + VCC + VCC_LO137// This is a special case because implicit VCC operand has 64 bit size.138// SP3 does not accept this instruction as well.139 140v_dual_add_f32      v255, vcc_lo, v2             ::  v_dual_cndmask_b32   v6, s1, v3141// GFX12: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)142// GFX12-NEXT:{{^}}v_dual_add_f32      v255, vcc_lo, v2             ::  v_dual_cndmask_b32   v6, s1, v3143// GFX12-NEXT:{{^}}                                                                              ^144