[llvm-dev] How to use FileCheck to check that two registers are different

Mark Searles via llvm-dev llvm-dev at lists.llvm.org
Wed May 31 18:17:40 PDT 2017


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>


More information about the llvm-dev mailing list