summaryrefslogtreecommitdiff
path: root/test/torture-s/pr54985.c.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/torture-s/pr54985.c.s')
-rw-r--r--test/torture-s/pr54985.c.s77
1 files changed, 77 insertions, 0 deletions
diff --git a/test/torture-s/pr54985.c.s b/test/torture-s/pr54985.c.s
new file mode 100644
index 000000000..19cdda7d1
--- /dev/null
+++ b/test/torture-s/pr54985.c.s
@@ -0,0 +1,77 @@
+ .text
+ .file "/b/build/slave/linux/build/src/buildbot/work/gcc/gcc/testsuite/gcc.c-torture/execute/pr54985.c"
+ .globl foo
+ .type foo,@function
+foo: # @foo
+ .param i32, i32
+ .result i32
+ .local i32, i32, i32, i32, i32
+# BB#0: # %entry
+ i32.const $3=, 0
+ copy_local $2=, $3
+ block BB0_4
+ i32.const $push1=, 0
+ i32.eq $push2=, $1, $pop1
+ br_if $pop2, BB0_4
+# BB#1: # %while.body.preheader
+ i32.load $6=, 0($0)
+ i32.const $4=, 4
+ i32.add $0=, $0, $4
+BB0_2: # %while.cond
+ # =>This Inner Loop Header: Depth=1
+ loop BB0_4
+ i32.const $push0=, -1
+ i32.add $1=, $1, $pop0
+ copy_local $2=, $3
+ i32.const $push3=, 0
+ i32.eq $push4=, $1, $pop3
+ br_if $pop4, BB0_4
+# BB#3: # %while.cond.while.body_crit_edge
+ # in Loop: Header=BB0_2 Depth=1
+ i32.load $2=, 0($0)
+ i32.add $0=, $0, $4
+ i32.lt_s $5=, $2, $6
+ copy_local $6=, $2
+ i32.const $2=, 1
+ br_if $5, BB0_2
+BB0_4: # %cleanup
+ return $2
+func_end0:
+ .size foo, func_end0-foo
+
+ .globl main
+ .type main,@function
+main: # @main
+ .result i32
+ .local i32, i32, i32, i32, i32
+# BB#0: # %entry
+ i32.const $0=, __stack_pointer
+ i32.load $0=, 0($0)
+ i32.const $1=, 16
+ i32.sub $4=, $0, $1
+ i32.const $1=, __stack_pointer
+ i32.store $4=, 0($1), $4
+ i64.const $push0=, 4294967298
+ i64.store $discard=, 8($4), $pop0
+ i32.const $push1=, 2
+ i32.const $3=, 8
+ i32.add $3=, $4, $3
+ block BB1_2
+ i32.call $push2=, foo, $3, $pop1
+ br_if $pop2, BB1_2
+# BB#1: # %if.end
+ i32.const $push3=, 0
+ i32.const $2=, 16
+ i32.add $4=, $4, $2
+ i32.const $2=, __stack_pointer
+ i32.store $4=, 0($2), $4
+ return $pop3
+BB1_2: # %if.then
+ call abort
+ unreachable
+func_end1:
+ .size main, func_end1-main
+
+
+ .ident "clang version 3.8.0 "
+ .section ".note.GNU-stack","",@progbits