OSDN Git Service

[WebAssembly] Remove infinite loop from reg-stackify test
authorDerek Schuff <dschuff@google.com>
Wed, 16 Aug 2017 00:49:44 +0000 (00:49 +0000)
committerDerek Schuff <dschuff@google.com>
Wed, 16 Aug 2017 00:49:44 +0000 (00:49 +0000)
r310940 exposed reverse-unreachable code to some optimizers,
which caused some of the code in this test to be sunk, changing
the input to the pass and breaking the exptectations.

Since that change is irrelevant to this particular test, this change
just adds an exit node to work around the problem; the
test should really be more robust (or be an MIR test?) but this preserves
the existing test intent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310981 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/WebAssembly/reg-stackify.ll

index ebda537..c6602d8 100644 (file)
@@ -357,7 +357,9 @@ bb17:                                             ; preds = %bb13, %bb8
 bb21:                                             ; preds = %bb17, %bb5
   %tmp22 = phi double [ %tmp, %bb5 ], [ %tmp9, %bb17 ]
   %tmp23 = fadd double %tmp6, 1.000000e+00
-  br label %bb5
+  br i1 %arg4, label %exit, label %bb5
+exit:
+  ret void
 }
 
 ; Don't move calls past loads