aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation
diff options
Diffstat (limited to 'validation')
-rw-r--r--validation/linear/asm-out0.c25
-rw-r--r--validation/mem2reg/asm-reload0.c14
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\\.
+ */