<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello all,<br>
<br>
For the hexagon target, we have a couple of tests that are failing
due to variations in the order of checked text. In these cases the
ordering is not directly relevant to the functionality being tested.<br>
<br>
For example:<br>
<blockquote><tt>; CHECK: memw(##a)</tt><br>
<tt>; CHECK: memw(##b)</tt><br>
<br>
<tt>%0 = load i32* @a, align 4</tt><br>
<tt>%1 = load i32* @b, align 4</tt><br>
</blockquote>
requires that the compiler emit the memory operations for 'a' and
'b' in that order, even though the intent of the test might simply
be to ensure that each 'load' results in a memory read.<br>
<br>
I'd like to teach FileCheck to allow tests to be more tolerant of
these incidental variations.<br>
<br>
The attached patch implements one possible solution. It introduces a
position stack and a couple of directives:<br>
<ul>
<li>'CHECK-PUSH:' pushes the current match position onto the
stack.</li>
<li>'CHECK-POP:' pops the top value off of the stack and uses it
to set the current match position.</li>
</ul>
The above test can now be re-written as:<br>
<blockquote><tt>; CHECK-PUSH:</tt><br>
<tt>; CHECK: memw(##a)</tt><br>
<tt>; CHECK-POP:</tt><br>
<tt>; CHECK: memw(##b)</tt><br>
<br>
<tt>%0 = load i32* @a, align 4</tt><br>
<tt>%1 = load i32* @b, align 4</tt><br>
</blockquote>
which handles either ordering of memory reads for 'a' and 'b'.<br>
<br>
Thoughts?<br>
<br>
Thanks,<br>
Matthew Curtis<br>
<pre class="moz-signature" cols="72">--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation</pre>
</body>
</html>