[llvm] r310981 - [WebAssembly] Remove infinite loop from reg-stackify test

Derek Schuff via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 15 17:49:44 PDT 2017


Author: dschuff
Date: Tue Aug 15 17:49:44 2017
New Revision: 310981

URL: http://llvm.org/viewvc/llvm-project?rev=310981&view=rev
Log:
[WebAssembly] Remove infinite loop from reg-stackify test

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.

Modified:
    llvm/trunk/test/CodeGen/WebAssembly/reg-stackify.ll

Modified: llvm/trunk/test/CodeGen/WebAssembly/reg-stackify.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/WebAssembly/reg-stackify.ll?rev=310981&r1=310980&r2=310981&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/WebAssembly/reg-stackify.ll (original)
+++ llvm/trunk/test/CodeGen/WebAssembly/reg-stackify.ll Tue Aug 15 17:49:44 2017
@@ -357,7 +357,9 @@ bb17:
 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




More information about the llvm-commits mailing list