aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-03-19 00:43:25 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-11-16 20:37:00 +0100
commit8376a70ce36ef3e22bfbab06455f5b6397f9c2de (patch)
treedbf514db8b9d4905f1896ad60f3587badd416a3a /validation/optim
parentc0428dfe31645d775003a83f66b67ee5d4aa83f6 (diff)
downloadsparse-dev-8376a70ce36ef3e22bfbab06455f5b6397f9c2de.tar.gz
inlined calls should not block BB packing
OP_INLINED_CALL are there only as a sort of annotation for debugging purpose. Their presence should thus not block the packing of basic blocks. Fix this by ignoring OP_INLINED_CALL when trying to pack a basic block. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/optim')
-rw-r--r--validation/optim/call-inlined.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/validation/optim/call-inlined.c b/validation/optim/call-inlined.c
new file mode 100644
index 00000000..00698a4b
--- /dev/null
+++ b/validation/optim/call-inlined.c
@@ -0,0 +1,30 @@
+static const char messg[] = "def";
+
+static inline int add(int a, int b)
+{
+ return a + b;
+}
+
+int foo(int a, int b, int p)
+{
+ if (p) {
+ add(a + b, 1);
+ return p;
+ }
+ return 0;
+}
+
+/*
+ * check-name: call-inlined
+ * check-command: test-linearize -Wno-decl $file
+ *
+ * check-output-start
+foo:
+.L0:
+ <entry-point>
+ select.32 %r9 <- %arg3, %arg3, $0
+ ret.32 %r9
+
+
+ * check-output-end
+ */