[PATCH] ARM testcase improvements

Quentin Colombet qcolombet at apple.com
Mon Oct 7 15:42:33 PDT 2013


Hi Matthias,

0001:
LGTM.

0002:
Unless I am missing the semantic of CHECK-DAG, this seems wrong:
+;CHECK-DAG: 	str	r0, [sp, #8]
+;CHECK-DAG: 	add	r0, sp, #8
How could a str-add sequence with a write-after-read dependency be semantically equivalent to a add-str with a read-after-write dependency?

At several places, you’ve replaced:
r0, r1, etc.
by
{{r[0-9]+}}
I didn’t check all the places, but in some of them, r0, r1, etc. directly come from the ABI constraints, so we want to explicitly check for them.
Please make sure, you are not obfuscated ABI constraints as it may emphasize we are doing something wrong!
One example is
-;CHECK: vst1.16 {d16[2]}, [r0:16]
+;CHECK: vst1.16 {{{d[0-9]+}}[2]}, [{{r[0-9]+}}:16]
r0 comes from the ABI.

Or here
-;CHECK: vst2.16 {d16[1], d17[1]}, [r0:32]
+;CHECK: vst2.16 {d16[1], d17[1]}, [{{r[0-9]+}}:32]
This one is even worse, because r0 comes from the ABI but not d16 and d17, thus they should have been “regexped” but not r0.

The last one should use CHECK and not CHECK-DAG:
+; CHECK-DAG:  add.w r[[ADDR:[0-9]+]], r[[SOURCE]], {{r[0-9]+}}, lsl #2
+; CHECK-DAG:  vld1.32 {[[DREG:d[0-9]+]][], [[DREG2:d[0-9]+]][]}, [r[[ADDR]]:32]       <— ADDR, read-after-write dependencies.

0003:
LGTM.
 
Thanks,
-Quentin

On Oct 7, 2013, at 2:08 PM, Matthias Braun <mbraun at apple.com> wrote:

> Attached are a few improvements to make some (mostly arm) testcases less dependent on a particular schedule/register allocation. Maybe you want to have these changes in the repository. Descriptions:
> 
> * Tests: Use CHECK-LABEL where possible
> * Tests: Be less dependent on a specific schedule/regalloc
> * Tests: Do not unnecessarily depend on kill comments
> 
> Greetings
> 	Matthias
> 
> <0001-Tests-Use-CHECK-LABEL-where-possible.patch><0002-Tests-Be-less-dependent-on-a-specific-schedule-regal.patch><0003-Tests-Do-not-unnecessarily-depend-on-kill-comments.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131007/ab1976d0/attachment.html>


More information about the llvm-commits mailing list