Mark Searles via llvm-dev
2017-Jun-01 01:17 UTC
[llvm-dev] How to use FileCheck to check that two registers are different
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, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170531/889fd50b/attachment.html>
Tom Stellard via llvm-dev
2017-Jun-01 02:38 UTC
[llvm-dev] How to use FileCheck to check that two registers are different
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 >