[WebAssembly] Split the checking from the sorting logic.
authorRichard Trieu <rtrieu@google.com>
Fri, 4 Jan 2019 06:49:24 +0000 (06:49 +0000)
committerRichard Trieu <rtrieu@google.com>
Fri, 4 Jan 2019 06:49:24 +0000 (06:49 +0000)
commite1fef949aea5918dfb802620972f423ca0d5c97f
treebebd6cc19bf4e093f2a258d5e9b4d2f2eca43eff
parent47beee2f3ffa2ae980b5a64e5a5bc21c7d15f30a
[WebAssembly] Split the checking from the sorting logic.

Move the check for -1 and identical values outside the vector sorting code.
Compare functions need to be able to compare identical elements to be
conforming.

llvm-svn: 350379
llvm/lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp