diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2021-02-25 23:10:31 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2021-02-25 23:10:31 +0100 |
| commit | 3d617353dda682db8b3eb6ea8c1fdfa89edfe5e2 (patch) | |
| tree | 5b304807553a44b79ff430d838b1e1b9f72e10e7 /validation | |
| parent | 60c1f2706e30eacc29296e6cb5d9327c85a01340 (diff) | |
| parent | 2f92df710ef708c5e5fabb551189213e9ad5127e (diff) | |
| download | sparse-dev-3d617353dda682db8b3eb6ea8c1fdfa89edfe5e2.tar.gz | |
Merge branch 'asm-dom'
* asm: output *memory* operands need their address as *input*
* asm: teach dominates() about OP_ASM
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/linear/asm-out0.c | 25 | ||||
| -rw-r--r-- | validation/mem2reg/asm-reload0.c | 14 |
2 files changed, 39 insertions, 0 deletions
diff --git a/validation/linear/asm-out0.c b/validation/linear/asm-out0.c new file mode 100644 index 00000000..a8e0be69 --- /dev/null +++ b/validation/linear/asm-out0.c @@ -0,0 +1,25 @@ +static void asm_out0(void) +{ + int mem; + asm volatile ("[%1] <= 0" : "=m" (mem)); +} + +/* + * check-name: asm-out0 + * check-command: test-linearize -fdump-ir $file + * + * check-output-start +asm_out0: +.L0: + <entry-point> + symaddr.64 %r1 <- mem + asm "[%1] <= 0" + out: "=m" (%r1) + br .L1 + +.L1: + ret + + + * check-output-end + */ diff --git a/validation/mem2reg/asm-reload0.c b/validation/mem2reg/asm-reload0.c new file mode 100644 index 00000000..ce1829e0 --- /dev/null +++ b/validation/mem2reg/asm-reload0.c @@ -0,0 +1,14 @@ +static int asm_reload(void) +{ + int mem = 0; + asm volatile ("[%1] <= 1" : "=m" (mem)); + return mem; +} + +/* + * check-name: asm-reload0 + * check-command: test-linearize $file + * + * check-output-ignore + * check-output-contains: load\\. + */ |
