From d7361313e11c698f5aef4ab5c9bc6ea90bdb58c9 Mon Sep 17 00:00:00 2001 From: Luc Van Oostenryck Date: Sun, 21 Feb 2021 10:24:33 +0100 Subject: asm-mem: add testcase for missing reload after asm memops Memory simplification is done with the help of the function dominates() which determine when memory instructions interfere. This function handles OP_CALLs, OP_LOADs and OP_STOREs but memory can also be changed via OP_ASMs. Add a testcase showing this. Signed-off-by: Luc Van Oostenryck --- validation/mem2reg/asm-reload0.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 validation/mem2reg/asm-reload0.c diff --git a/validation/mem2reg/asm-reload0.c b/validation/mem2reg/asm-reload0.c new file mode 100644 index 00000000..c9e297dd --- /dev/null +++ b/validation/mem2reg/asm-reload0.c @@ -0,0 +1,15 @@ +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-known-to-fail + * + * check-output-ignore + * check-output-contains: load\\. + */ -- cgit 1.2.3-korg