[llvm-dev] How to use FileCheck to check that two registers are different
Tom Stellard via llvm-dev
llvm-dev at lists.llvm.org
Wed May 31 19:38:05 PDT 2017
On 05/31/2017 09:17 PM, Mark Searles via llvm-dev wrote:
> Can FileCheck be used to check that two registers are not the same?
>
> Context: the AMDGPU v_qsad_pk_u16_8 instructions looks like this:
> v_qsad_pk_u16_8 dst, src0, src1, src2
>
> The destination register must be different than the source registers. I know how how to check that, say, src2 is the same as the dst register but not how to check that src2 is not the same as the dst register.
>
> Here's my initial try, but as you can see it'll pass, rather than fail, if dst and src2 are the same.
> v_qsad_pk_u16_u8 [[DEST:v\[[0-9]+:[0-9]+\]]], s[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}, [[DEST]]
>
> Thanks for any suggestions,
>
You can use the CHECK-NOT: label to tell it to fail if it matches the pattern.
-Tom
> Mark
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
More information about the llvm-dev
mailing list