xref: /aosp_15_r20/external/llvm/test/CodeGen/Mips/inlineasm-cnstrnt-bad-K.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker;
2*9880d681SAndroid Build Coastguard Worker;This is a negative test. The constant value given for the constraint (K)
3*9880d681SAndroid Build Coastguard Worker;is greater than 16 bits (0x00100000).
4*9880d681SAndroid Build Coastguard Worker;
5*9880d681SAndroid Build Coastguard Worker; RUN: not llc -march=mipsel < %s  2> %t
6*9880d681SAndroid Build Coastguard Worker; RUN: FileCheck --check-prefix=CHECK-ERRORS < %t %s
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Workerdefine i32 @main() nounwind {
9*9880d681SAndroid Build Coastguard Workerentry:
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Worker;CHECK-ERRORS:	error: invalid operand for inline asm constraint 'K'
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Worker  tail call i32 asm "addu $0,$1,$2", "=r,r,K"(i32 1024, i32 1048576) nounwind
14*9880d681SAndroid Build Coastguard Worker  ret i32 0
15*9880d681SAndroid Build Coastguard Worker}
16*9880d681SAndroid Build Coastguard Worker
17