Index: llvm/lib/Target/WebAssembly/CMakeLists.txt =================================================================== --- llvm/lib/Target/WebAssembly/CMakeLists.txt +++ llvm/lib/Target/WebAssembly/CMakeLists.txt @@ -67,6 +67,7 @@ BinaryFormat CodeGen Core + InstCombine MC Scalar SelectionDAG Index: llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp =================================================================== --- llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp +++ llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp @@ -30,6 +30,7 @@ #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/TargetRegistry.h" #include "llvm/Target/TargetOptions.h" +#include "llvm/Transforms/InstCombine/InstCombine.h" #include "llvm/Transforms/Scalar.h" #include "llvm/Transforms/Scalar/LowerAtomicPass.h" #include "llvm/Transforms/Utils.h" @@ -461,6 +462,13 @@ // Expand indirectbr instructions to switches. addPass(createIndirectBrExpandPass()); + if (getOptLevel() >= CodeGenOpt::Default) { + addPass(createSeparateConstOffsetFromGEPPass()); + addPass(createEarlyCSEPass()); + addPass(createInstructionCombiningPass()); + addPass(createLICMPass()); + } + TargetPassConfig::addIRPasses(); } Index: llvm/test/CodeGen/WebAssembly/PR41149.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/PR41149.ll +++ llvm/test/CodeGen/WebAssembly/PR41149.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py -; RUN: llc < %s -mtriple=wasm32-unknown-unknown | FileCheck %s +; RUN: llc < %s -O1 -mtriple=wasm32-unknown-unknown | FileCheck %s ; Regression test for PR41149. Index: llvm/test/CodeGen/WebAssembly/address-offsets.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/address-offsets.ll +++ llvm/test/CodeGen/WebAssembly/address-offsets.ll @@ -40,14 +40,12 @@ ; CHECK-LABEL: load_test1: ; CHECK: .functype load_test1 (i32) -> (i32) ; CHECK-NEXT: # %bb.0: +; CHECK-NEXT: global.get $push2=, g@GOT ; CHECK-NEXT: i32.const $push0=, 2 ; CHECK-NEXT: i32.shl $push1=, $0, $pop0 -; CHECK-NEXT: global.get $push2=, g@GOT -; CHECK-NEXT: i32.add $push3=, $pop1, $pop2 -; CHECK-NEXT: i32.const $push4=, 40 -; CHECK-NEXT: i32.add $push5=, $pop3, $pop4 -; CHECK-NEXT: i32.load $push6=, 0($pop5) -; CHECK-NEXT: return $pop6 +; CHECK-NEXT: i32.add $push3=, $pop2, $pop1 +; CHECK-NEXT: i32.load $push4=, 40($pop3) +; CHECK-NEXT: return $pop4 %add = add nsw i32 %n, 10 %arrayidx = getelementptr inbounds [0 x i32], ptr @g, i32 0, i32 %add %t = load i32, ptr %arrayidx, align 4 @@ -58,14 +56,12 @@ ; CHECK-LABEL: load_test2: ; CHECK: .functype load_test2 (i32) -> (i32) ; CHECK-NEXT: # %bb.0: +; CHECK-NEXT: global.get $push2=, g@GOT ; CHECK-NEXT: i32.const $push0=, 2 ; CHECK-NEXT: i32.shl $push1=, $0, $pop0 -; CHECK-NEXT: global.get $push2=, g@GOT -; CHECK-NEXT: i32.add $push3=, $pop1, $pop2 -; CHECK-NEXT: i32.const $push4=, 40 -; CHECK-NEXT: i32.add $push5=, $pop3, $pop4 -; CHECK-NEXT: i32.load $push6=, 0($pop5) -; CHECK-NEXT: return $pop6 +; CHECK-NEXT: i32.add $push3=, $pop2, $pop1 +; CHECK-NEXT: i32.load $push4=, 40($pop3) +; CHECK-NEXT: return $pop4 %add = add nsw i32 10, %n %arrayidx = getelementptr inbounds [0 x i32], ptr @g, i32 0, i32 %add %t = load i32, ptr %arrayidx, align 4 @@ -126,14 +122,12 @@ ; CHECK-LABEL: load_test6: ; CHECK: .functype load_test6 (i32) -> (i32) ; CHECK-NEXT: # %bb.0: +; CHECK-NEXT: global.get $push2=, g@GOT ; CHECK-NEXT: i32.const $push0=, 2 ; CHECK-NEXT: i32.shl $push1=, $0, $pop0 -; CHECK-NEXT: global.get $push2=, g@GOT -; CHECK-NEXT: i32.add $push3=, $pop1, $pop2 -; CHECK-NEXT: i32.const $push4=, 40 -; CHECK-NEXT: i32.add $push5=, $pop3, $pop4 -; CHECK-NEXT: i32.load $push6=, 0($pop5) -; CHECK-NEXT: return $pop6 +; CHECK-NEXT: i32.add $push3=, $pop2, $pop1 +; CHECK-NEXT: i32.load $push4=, 40($pop3) +; CHECK-NEXT: return $pop4 %add = add nsw i32 %n, 10 %add.ptr = getelementptr inbounds [0 x i32], ptr @g, i32 0, i32 %add %t = load i32, ptr %add.ptr, align 4 @@ -160,14 +154,12 @@ ; CHECK-LABEL: load_test8: ; CHECK: .functype load_test8 (i32) -> (i32) ; CHECK-NEXT: # %bb.0: +; CHECK-NEXT: global.get $push2=, g@GOT ; CHECK-NEXT: i32.const $push0=, 2 ; CHECK-NEXT: i32.shl $push1=, $0, $pop0 -; CHECK-NEXT: global.get $push2=, g@GOT -; CHECK-NEXT: i32.add $push3=, $pop1, $pop2 -; CHECK-NEXT: i32.const $push4=, 40 -; CHECK-NEXT: i32.add $push5=, $pop3, $pop4 -; CHECK-NEXT: i32.load $push6=, 0($pop5) -; CHECK-NEXT: return $pop6 +; CHECK-NEXT: i32.add $push3=, $pop2, $pop1 +; CHECK-NEXT: i32.load $push4=, 40($pop3) +; CHECK-NEXT: return $pop4 %add = add nsw i32 10, %n %add.ptr = getelementptr inbounds [0 x i32], ptr @g, i32 0, i32 %add %t = load i32, ptr %add.ptr, align 4 @@ -235,11 +227,9 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const $push0=, 2 ; CHECK-NEXT: i32.shl $push1=, $1, $pop0 -; CHECK-NEXT: i32.add $push2=, $pop1, $0 -; CHECK-NEXT: i32.const $push3=, 40 -; CHECK-NEXT: i32.add $push4=, $pop2, $pop3 -; CHECK-NEXT: i32.load $push5=, 0($pop4) -; CHECK-NEXT: return $pop5 +; CHECK-NEXT: i32.add $push2=, $0, $pop1 +; CHECK-NEXT: i32.load $push3=, 40($pop2) +; CHECK-NEXT: return $pop3 %add = add nsw i32 %n, 10 %arrayidx = getelementptr inbounds i32, ptr %p, i32 %add %t = load i32, ptr %arrayidx, align 4 @@ -252,11 +242,9 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const $push0=, 2 ; CHECK-NEXT: i32.shl $push1=, $1, $pop0 -; CHECK-NEXT: i32.add $push2=, $pop1, $0 -; CHECK-NEXT: i32.const $push3=, 40 -; CHECK-NEXT: i32.add $push4=, $pop2, $pop3 -; CHECK-NEXT: i32.load $push5=, 0($pop4) -; CHECK-NEXT: return $pop5 +; CHECK-NEXT: i32.add $push2=, $0, $pop1 +; CHECK-NEXT: i32.load $push3=, 40($pop2) +; CHECK-NEXT: return $pop3 %add = add nsw i32 10, %n %arrayidx = getelementptr inbounds i32, ptr %p, i32 %add %t = load i32, ptr %arrayidx, align 4 @@ -318,11 +306,9 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const $push0=, 2 ; CHECK-NEXT: i32.shl $push1=, $1, $pop0 -; CHECK-NEXT: i32.add $push2=, $pop1, $0 -; CHECK-NEXT: i32.const $push3=, 40 -; CHECK-NEXT: i32.add $push4=, $pop2, $pop3 -; CHECK-NEXT: i32.load $push5=, 0($pop4) -; CHECK-NEXT: return $pop5 +; CHECK-NEXT: i32.add $push2=, $0, $pop1 +; CHECK-NEXT: i32.load $push3=, 40($pop2) +; CHECK-NEXT: return $pop3 %add = add nsw i32 %n, 10 %add.ptr = getelementptr inbounds i32, ptr %p, i32 %add %t = load i32, ptr %add.ptr, align 4 @@ -350,11 +336,9 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const $push0=, 2 ; CHECK-NEXT: i32.shl $push1=, $1, $pop0 -; CHECK-NEXT: i32.add $push2=, $pop1, $0 -; CHECK-NEXT: i32.const $push3=, 40 -; CHECK-NEXT: i32.add $push4=, $pop2, $pop3 -; CHECK-NEXT: i32.load $push5=, 0($pop4) -; CHECK-NEXT: return $pop5 +; CHECK-NEXT: i32.add $push2=, $0, $pop1 +; CHECK-NEXT: i32.load $push3=, 40($pop2) +; CHECK-NEXT: return $pop3 %add = add nsw i32 10, %n %add.ptr = getelementptr inbounds i32, ptr %p, i32 %add %t = load i32, ptr %add.ptr, align 4 @@ -419,13 +403,11 @@ ; CHECK-LABEL: store_test1: ; CHECK: .functype store_test1 (i32, i32) -> () ; CHECK-NEXT: # %bb.0: +; CHECK-NEXT: global.get $push2=, g@GOT ; CHECK-NEXT: i32.const $push0=, 2 ; CHECK-NEXT: i32.shl $push1=, $0, $pop0 -; CHECK-NEXT: global.get $push2=, g@GOT -; CHECK-NEXT: i32.add $push3=, $pop1, $pop2 -; CHECK-NEXT: i32.const $push4=, 40 -; CHECK-NEXT: i32.add $push5=, $pop3, $pop4 -; CHECK-NEXT: i32.store 0($pop5), $1 +; CHECK-NEXT: i32.add $push3=, $pop2, $pop1 +; CHECK-NEXT: i32.store 40($pop3), $1 ; CHECK-NEXT: return %add = add nsw i32 %n, 10 %arrayidx = getelementptr inbounds [0 x i32], ptr @g, i32 0, i32 %add @@ -437,13 +419,11 @@ ; CHECK-LABEL: store_test2: ; CHECK: .functype store_test2 (i32, i32) -> () ; CHECK-NEXT: # %bb.0: +; CHECK-NEXT: global.get $push2=, g@GOT ; CHECK-NEXT: i32.const $push0=, 2 ; CHECK-NEXT: i32.shl $push1=, $0, $pop0 -; CHECK-NEXT: global.get $push2=, g@GOT -; CHECK-NEXT: i32.add $push3=, $pop1, $pop2 -; CHECK-NEXT: i32.const $push4=, 40 -; CHECK-NEXT: i32.add $push5=, $pop3, $pop4 -; CHECK-NEXT: i32.store 0($pop5), $1 +; CHECK-NEXT: i32.add $push3=, $pop2, $pop1 +; CHECK-NEXT: i32.store 40($pop3), $1 ; CHECK-NEXT: return %add = add nsw i32 10, %n %arrayidx = getelementptr inbounds [0 x i32], ptr @g, i32 0, i32 %add @@ -505,13 +485,11 @@ ; CHECK-LABEL: store_test6: ; CHECK: .functype store_test6 (i32, i32) -> () ; CHECK-NEXT: # %bb.0: +; CHECK-NEXT: global.get $push2=, g@GOT ; CHECK-NEXT: i32.const $push0=, 2 ; CHECK-NEXT: i32.shl $push1=, $0, $pop0 -; CHECK-NEXT: global.get $push2=, g@GOT -; CHECK-NEXT: i32.add $push3=, $pop1, $pop2 -; CHECK-NEXT: i32.const $push4=, 40 -; CHECK-NEXT: i32.add $push5=, $pop3, $pop4 -; CHECK-NEXT: i32.store 0($pop5), $1 +; CHECK-NEXT: i32.add $push3=, $pop2, $pop1 +; CHECK-NEXT: i32.store 40($pop3), $1 ; CHECK-NEXT: return %add = add nsw i32 %n, 10 %add.ptr = getelementptr inbounds [0 x i32], ptr @g, i32 0, i32 %add @@ -539,13 +517,11 @@ ; CHECK-LABEL: store_test8: ; CHECK: .functype store_test8 (i32, i32) -> () ; CHECK-NEXT: # %bb.0: +; CHECK-NEXT: global.get $push2=, g@GOT ; CHECK-NEXT: i32.const $push0=, 2 ; CHECK-NEXT: i32.shl $push1=, $0, $pop0 -; CHECK-NEXT: global.get $push2=, g@GOT -; CHECK-NEXT: i32.add $push3=, $pop1, $pop2 -; CHECK-NEXT: i32.const $push4=, 40 -; CHECK-NEXT: i32.add $push5=, $pop3, $pop4 -; CHECK-NEXT: i32.store 0($pop5), $1 +; CHECK-NEXT: i32.add $push3=, $pop2, $pop1 +; CHECK-NEXT: i32.store 40($pop3), $1 ; CHECK-NEXT: return %add = add nsw i32 10, %n %add.ptr = getelementptr inbounds [0 x i32], ptr @g, i32 0, i32 %add @@ -614,10 +590,8 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const $push0=, 2 ; CHECK-NEXT: i32.shl $push1=, $1, $pop0 -; CHECK-NEXT: i32.add $push2=, $pop1, $0 -; CHECK-NEXT: i32.const $push3=, 40 -; CHECK-NEXT: i32.add $push4=, $pop2, $pop3 -; CHECK-NEXT: i32.store 0($pop4), $2 +; CHECK-NEXT: i32.add $push2=, $0, $pop1 +; CHECK-NEXT: i32.store 40($pop2), $2 ; CHECK-NEXT: return %add = add nsw i32 %n, 10 %arrayidx = getelementptr inbounds i32, ptr %p, i32 %add @@ -631,10 +605,8 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const $push0=, 2 ; CHECK-NEXT: i32.shl $push1=, $1, $pop0 -; CHECK-NEXT: i32.add $push2=, $pop1, $0 -; CHECK-NEXT: i32.const $push3=, 40 -; CHECK-NEXT: i32.add $push4=, $pop2, $pop3 -; CHECK-NEXT: i32.store 0($pop4), $2 +; CHECK-NEXT: i32.add $push2=, $0, $pop1 +; CHECK-NEXT: i32.store 40($pop2), $2 ; CHECK-NEXT: return %add = add nsw i32 10, %n %arrayidx = getelementptr inbounds i32, ptr %p, i32 %add @@ -697,10 +669,8 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const $push0=, 2 ; CHECK-NEXT: i32.shl $push1=, $1, $pop0 -; CHECK-NEXT: i32.add $push2=, $pop1, $0 -; CHECK-NEXT: i32.const $push3=, 40 -; CHECK-NEXT: i32.add $push4=, $pop2, $pop3 -; CHECK-NEXT: i32.store 0($pop4), $2 +; CHECK-NEXT: i32.add $push2=, $0, $pop1 +; CHECK-NEXT: i32.store 40($pop2), $2 ; CHECK-NEXT: return %add = add nsw i32 %n, 10 %add.ptr = getelementptr inbounds i32, ptr %p, i32 %add @@ -729,10 +699,8 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const $push0=, 2 ; CHECK-NEXT: i32.shl $push1=, $1, $pop0 -; CHECK-NEXT: i32.add $push2=, $pop1, $0 -; CHECK-NEXT: i32.const $push3=, 40 -; CHECK-NEXT: i32.add $push4=, $pop2, $pop3 -; CHECK-NEXT: i32.store 0($pop4), $2 +; CHECK-NEXT: i32.add $push2=, $0, $pop1 +; CHECK-NEXT: i32.store 40($pop2), $2 ; CHECK-NEXT: return %add = add nsw i32 10, %n %add.ptr = getelementptr inbounds i32, ptr %p, i32 %add Index: llvm/test/CodeGen/WebAssembly/atomic-fence.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/atomic-fence.ll +++ llvm/test/CodeGen/WebAssembly/atomic-fence.ll @@ -1,5 +1,5 @@ -; RUN: llc < %s | FileCheck %s --check-prefix NOATOMIC -; RUN: llc < %s -asm-verbose=false -wasm-disable-explicit-locals -wasm-keep-registers -mattr=+atomics | FileCheck %s +; RUN: llc < %s -O1 | FileCheck %s --check-prefix NOATOMIC +; RUN: llc < %s -O1 -asm-verbose=false -wasm-disable-explicit-locals -wasm-keep-registers -mattr=+atomics | FileCheck %s target triple = "wasm32-unknown-unknown" Index: llvm/test/CodeGen/WebAssembly/bulk-memory.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/bulk-memory.ll +++ llvm/test/CodeGen/WebAssembly/bulk-memory.ll @@ -1,5 +1,5 @@ -; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mcpu=mvp -mattr=+bulk-memory | FileCheck %s --check-prefixes CHECK,BULK-MEM -; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mcpu=mvp -mattr=-bulk-memory | FileCheck %s --check-prefixes CHECK,NO-BULK-MEM +; RUN: llc < %s -O1 -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mcpu=mvp -mattr=+bulk-memory | FileCheck %s --check-prefixes CHECK,BULK-MEM +; RUN: llc < %s -O1 -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mcpu=mvp -mattr=-bulk-memory | FileCheck %s --check-prefixes CHECK,NO-BULK-MEM ; Test that basic bulk memory codegen works correctly Index: llvm/test/CodeGen/WebAssembly/bulk-memory64.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/bulk-memory64.ll +++ llvm/test/CodeGen/WebAssembly/bulk-memory64.ll @@ -1,5 +1,5 @@ -; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mcpu=mvp -mattr=+bulk-memory | FileCheck %s --check-prefixes CHECK,BULK-MEM -; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mcpu=mvp -mattr=-bulk-memory | FileCheck %s --check-prefixes CHECK,NO-BULK-MEM +; RUN: llc < %s -O1 -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mcpu=mvp -mattr=+bulk-memory | FileCheck %s --check-prefixes CHECK,BULK-MEM +; RUN: llc < %s -O1 -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mcpu=mvp -mattr=-bulk-memory | FileCheck %s --check-prefixes CHECK,NO-BULK-MEM ; Test that basic bulk memory codegen works correctly Index: llvm/test/CodeGen/WebAssembly/cfg-stackify-dbg-skip.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/cfg-stackify-dbg-skip.ll +++ llvm/test/CodeGen/WebAssembly/cfg-stackify-dbg-skip.ll @@ -1,4 +1,4 @@ -; RUN: llc %s -stop-after wasm-cfg-stackify -o - | FileCheck %s +; RUN: llc %s -O1 -stop-after wasm-cfg-stackify -o - | FileCheck %s ; The test ensures "block" instruction is not inserted in the middle of a group ; of instructions that form a stackified expression when DBG_VALUE is present Index: llvm/test/CodeGen/WebAssembly/cfg-stackify.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/cfg-stackify.ll +++ llvm/test/CodeGen/WebAssembly/cfg-stackify.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -disable-block-placement -verify-machineinstrs -fast-isel=false -machine-sink-split-probability-threshold=0 -cgp-freq-ratio-to-skip-merge=1000 | FileCheck %s +; RUN: llc < %s -start-after=licm -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -disable-block-placement -verify-machineinstrs -fast-isel=false -machine-sink-split-probability-threshold=0 -cgp-freq-ratio-to-skip-merge=1000 | FileCheck %s ; Test the CFG stackifier pass. Index: llvm/test/CodeGen/WebAssembly/comparisons-f32.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/comparisons-f32.ll +++ llvm/test/CodeGen/WebAssembly/comparisons-f32.ll @@ -433,15 +433,12 @@ ; CHECK-NEXT: block ; CHECK-NEXT: block ; CHECK-NEXT: block -; CHECK-NEXT: local.get $push8=, 0 -; CHECK-NEXT: local.get $push7=, 1 -; CHECK-NEXT: f32.ge $push1=, $pop8, $pop7 -; CHECK-NEXT: i32.const $push2=, 1 -; CHECK-NEXT: i32.xor $push3=, $pop1, $pop2 -; CHECK-NEXT: i32.const $push6=, 1 -; CHECK-NEXT: i32.add $push4=, $pop3, $pop6 -; CHECK-NEXT: i32.const $push5=, 1 -; CHECK-NEXT: i32.xor $push0=, $pop4, $pop5 +; CHECK-NEXT: i32.const $push3=, 0 +; CHECK-NEXT: i32.const $push2=, 3 +; CHECK-NEXT: local.get $push5=, 0 +; CHECK-NEXT: local.get $push4=, 1 +; CHECK-NEXT: f32.ge $push1=, $pop5, $pop4 +; CHECK-NEXT: i32.select $push0=, $pop3, $pop2, $pop1 ; CHECK-NEXT: br_table $pop0, 0, 1, 2, 3 # 0: down to label12 ; CHECK-NEXT: # 1: down to label11 ; CHECK-NEXT: # 2: down to label10 Index: llvm/test/CodeGen/WebAssembly/comparisons-f64.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/comparisons-f64.ll +++ llvm/test/CodeGen/WebAssembly/comparisons-f64.ll @@ -432,15 +432,12 @@ ; CHECK-NEXT: block ; CHECK-NEXT: block ; CHECK-NEXT: block -; CHECK-NEXT: local.get $push8=, 0 -; CHECK-NEXT: local.get $push7=, 1 -; CHECK-NEXT: f64.ge $push1=, $pop8, $pop7 -; CHECK-NEXT: i32.const $push2=, 1 -; CHECK-NEXT: i32.xor $push3=, $pop1, $pop2 -; CHECK-NEXT: i32.const $push6=, 1 -; CHECK-NEXT: i32.add $push4=, $pop3, $pop6 -; CHECK-NEXT: i32.const $push5=, 1 -; CHECK-NEXT: i32.xor $push0=, $pop4, $pop5 +; CHECK-NEXT: i32.const $push3=, 0 +; CHECK-NEXT: i32.const $push2=, 3 +; CHECK-NEXT: local.get $push5=, 0 +; CHECK-NEXT: local.get $push4=, 1 +; CHECK-NEXT: f64.ge $push1=, $pop5, $pop4 +; CHECK-NEXT: i32.select $push0=, $pop3, $pop2, $pop1 ; CHECK-NEXT: br_table $pop0, 0, 1, 2, 3 # 0: down to label12 ; CHECK-NEXT: # 1: down to label11 ; CHECK-NEXT: # 2: down to label10 Index: llvm/test/CodeGen/WebAssembly/debugtrap.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/debugtrap.ll +++ llvm/test/CodeGen/WebAssembly/debugtrap.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -asm-verbose=false -verify-machineinstrs | FileCheck %s +; RUN: llc < %s -O1 -asm-verbose=false -verify-machineinstrs | FileCheck %s ; Test lowering of __builtin_debugtrap in cases where lowering it via ; the normal UNREACHABLE instruction would yield invalid Index: llvm/test/CodeGen/WebAssembly/externref-ptrtoint.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/externref-ptrtoint.ll +++ llvm/test/CodeGen/WebAssembly/externref-ptrtoint.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s --mtriple=wasm32-unknown-unknown -asm-verbose=false -mattr=+reference-types 2>&1 | FileCheck %s +; RUN: llc < %s -O1 --mtriple=wasm32-unknown-unknown -asm-verbose=false -mattr=+reference-types 2>&1 | FileCheck %s %externref = type ptr addrspace(10) Index: llvm/test/CodeGen/WebAssembly/externref-tableget.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/externref-tableget.ll +++ llvm/test/CodeGen/WebAssembly/externref-tableget.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s --mtriple=wasm32-unknown-unknown -asm-verbose=false -mattr=+reference-types | FileCheck %s +; RUN: llc < %s -O1 --mtriple=wasm32-unknown-unknown -asm-verbose=false -mattr=+reference-types | FileCheck %s %externref = type ptr addrspace(10) ;; addrspace 10 is nonintegral Index: llvm/test/CodeGen/WebAssembly/externref-tableset.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/externref-tableset.ll +++ llvm/test/CodeGen/WebAssembly/externref-tableset.ll @@ -1,4 +1,4 @@ -; RUN: llc --mtriple=wasm32-unknown-unknown -asm-verbose=false -mattr=+reference-types < %s | FileCheck %s +; RUN: llc -O1 --mtriple=wasm32-unknown-unknown -asm-verbose=false -mattr=+reference-types < %s | FileCheck %s %externref = type ptr addrspace(10) ;; addrspace 10 is nonintegral Index: llvm/test/CodeGen/WebAssembly/f32.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/f32.ll +++ llvm/test/CodeGen/WebAssembly/f32.ll @@ -167,10 +167,13 @@ ; CHECK-LABEL: fmin32: ; CHECK: .functype fmin32 (f32) -> (f32) ; CHECK-NEXT: # %bb.0: -; CHECK-NEXT: local.get $push2=, 0 ; CHECK-NEXT: f32.const $push0=, 0x0p0 -; CHECK-NEXT: f32.min $push1=, $pop2, $pop0 -; CHECK-NEXT: return $pop1 +; CHECK-NEXT: local.get $push5=, 0 +; CHECK-NEXT: local.get $push4=, 0 +; CHECK-NEXT: f32.const $push3=, 0x0p0 +; CHECK-NEXT: f32.ge $push1=, $pop4, $pop3 +; CHECK-NEXT: f32.select $push2=, $pop0, $pop5, $pop1 +; CHECK-NEXT: return $pop2 %a = fcmp ult float %x, 0.0 %b = select i1 %a, float %x, float 0.0 ret float %b @@ -180,10 +183,13 @@ ; CHECK-LABEL: fmax32: ; CHECK: .functype fmax32 (f32) -> (f32) ; CHECK-NEXT: # %bb.0: -; CHECK-NEXT: local.get $push2=, 0 ; CHECK-NEXT: f32.const $push0=, 0x0p0 -; CHECK-NEXT: f32.max $push1=, $pop2, $pop0 -; CHECK-NEXT: return $pop1 +; CHECK-NEXT: local.get $push5=, 0 +; CHECK-NEXT: local.get $push4=, 0 +; CHECK-NEXT: f32.const $push3=, 0x0p0 +; CHECK-NEXT: f32.le $push1=, $pop4, $pop3 +; CHECK-NEXT: f32.select $push2=, $pop0, $pop5, $pop1 +; CHECK-NEXT: return $pop2 %a = fcmp ugt float %x, 0.0 %b = select i1 %a, float %x, float 0.0 ret float %b Index: llvm/test/CodeGen/WebAssembly/f64.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/f64.ll +++ llvm/test/CodeGen/WebAssembly/f64.ll @@ -167,10 +167,13 @@ ; CHECK-LABEL: fmin64: ; CHECK: .functype fmin64 (f64) -> (f64) ; CHECK-NEXT: # %bb.0: -; CHECK-NEXT: local.get $push2=, 0 ; CHECK-NEXT: f64.const $push0=, 0x0p0 -; CHECK-NEXT: f64.min $push1=, $pop2, $pop0 -; CHECK-NEXT: return $pop1 +; CHECK-NEXT: local.get $push5=, 0 +; CHECK-NEXT: local.get $push4=, 0 +; CHECK-NEXT: f64.const $push3=, 0x0p0 +; CHECK-NEXT: f64.ge $push1=, $pop4, $pop3 +; CHECK-NEXT: f64.select $push2=, $pop0, $pop5, $pop1 +; CHECK-NEXT: return $pop2 %a = fcmp ult double %x, 0.0 %b = select i1 %a, double %x, double 0.0 ret double %b @@ -180,10 +183,13 @@ ; CHECK-LABEL: fmax64: ; CHECK: .functype fmax64 (f64) -> (f64) ; CHECK-NEXT: # %bb.0: -; CHECK-NEXT: local.get $push2=, 0 ; CHECK-NEXT: f64.const $push0=, 0x0p0 -; CHECK-NEXT: f64.max $push1=, $pop2, $pop0 -; CHECK-NEXT: return $pop1 +; CHECK-NEXT: local.get $push5=, 0 +; CHECK-NEXT: local.get $push4=, 0 +; CHECK-NEXT: f64.const $push3=, 0x0p0 +; CHECK-NEXT: f64.le $push1=, $pop4, $pop3 +; CHECK-NEXT: f64.select $push2=, $pop0, $pop5, $pop1 +; CHECK-NEXT: return $pop2 %a = fcmp ugt double %x, 0.0 %b = select i1 %a, double %x, double 0.0 ret double %b Index: llvm/test/CodeGen/WebAssembly/fast-isel-br-i1.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/fast-isel-br-i1.ll +++ llvm/test/CodeGen/WebAssembly/fast-isel-br-i1.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -fast-isel -asm-verbose=false -wasm-keep-registers | FileCheck %s +; RUN: llc < %s -O1 -fast-isel -asm-verbose=false -wasm-keep-registers | FileCheck %s target triple = "wasm32-unknown-unknown" Index: llvm/test/CodeGen/WebAssembly/fpclamptosat.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/fpclamptosat.ll +++ llvm/test/CodeGen/WebAssembly/fpclamptosat.ll @@ -127,8 +127,7 @@ ; CHECK-NEXT: local.get 0 ; CHECK-NEXT: call __truncsfhf2 ; CHECK-NEXT: call __extendhfsf2 -; CHECK-NEXT: i64.trunc_sat_f32_s -; CHECK-NEXT: i32.wrap_i64 +; CHECK-NEXT: i32.trunc_sat_f32_s ; CHECK-NEXT: # fallthrough-return entry: %conv = fptosi half %x to i64 @@ -160,8 +159,7 @@ ; CHECK-NEXT: local.get 0 ; CHECK-NEXT: call __truncsfhf2 ; CHECK-NEXT: call __extendhfsf2 -; CHECK-NEXT: i64.trunc_sat_f32_u -; CHECK-NEXT: i32.wrap_i64 +; CHECK-NEXT: i32.trunc_sat_f32_u ; CHECK-NEXT: # fallthrough-return entry: %conv = fptoui half %x to i64 @@ -406,18 +404,11 @@ define i16 @utesth_f16i16(half %x) { ; CHECK-LABEL: utesth_f16i16: ; CHECK: .functype utesth_f16i16 (f32) -> (i32) -; CHECK-NEXT: .local i32 ; CHECK-NEXT: # %bb.0: # %entry ; CHECK-NEXT: local.get 0 ; CHECK-NEXT: call __truncsfhf2 ; CHECK-NEXT: call __extendhfsf2 ; CHECK-NEXT: i32.trunc_sat_f32_u -; CHECK-NEXT: local.tee 1 -; CHECK-NEXT: i32.const 65535 -; CHECK-NEXT: local.get 1 -; CHECK-NEXT: i32.const 65535 -; CHECK-NEXT: i32.lt_u -; CHECK-NEXT: i32.select ; CHECK-NEXT: # fallthrough-return entry: %conv = fptoui half %x to i32 @@ -445,24 +436,11 @@ define i16 @ustest_f16i16(half %x) { ; CHECK-LABEL: ustest_f16i16: ; CHECK: .functype ustest_f16i16 (f32) -> (i32) -; CHECK-NEXT: .local i32 ; CHECK-NEXT: # %bb.0: # %entry ; CHECK-NEXT: local.get 0 ; CHECK-NEXT: call __truncsfhf2 ; CHECK-NEXT: call __extendhfsf2 -; CHECK-NEXT: i32.trunc_sat_f32_s -; CHECK-NEXT: local.tee 1 -; CHECK-NEXT: i32.const 65535 -; CHECK-NEXT: local.get 1 -; CHECK-NEXT: i32.const 65535 -; CHECK-NEXT: i32.lt_s -; CHECK-NEXT: i32.select -; CHECK-NEXT: local.tee 1 -; CHECK-NEXT: i32.const 0 -; CHECK-NEXT: local.get 1 -; CHECK-NEXT: i32.const 0 -; CHECK-NEXT: i32.gt_s -; CHECK-NEXT: i32.select +; CHECK-NEXT: i32.trunc_sat_f32_u ; CHECK-NEXT: # fallthrough-return entry: %conv = fptosi half %x to i32 @@ -621,10 +599,8 @@ ; CHECK-NEXT: local.tee 1 ; CHECK-NEXT: i64.select ; CHECK-NEXT: local.tee 3 -; CHECK-NEXT: i64.const 0 ; CHECK-NEXT: local.get 3 ; CHECK-NEXT: i64.const 0 -; CHECK-NEXT: i64.ne ; CHECK-NEXT: local.get 2 ; CHECK-NEXT: i64.const 1 ; CHECK-NEXT: local.get 1 @@ -632,9 +608,9 @@ ; CHECK-NEXT: local.tee 2 ; CHECK-NEXT: i64.const 0 ; CHECK-NEXT: i64.gt_s +; CHECK-NEXT: i64.select ; CHECK-NEXT: local.get 2 ; CHECK-NEXT: i64.eqz -; CHECK-NEXT: i32.select ; CHECK-NEXT: i64.select ; CHECK-NEXT: # fallthrough-return entry: @@ -806,10 +782,8 @@ ; CHECK-NEXT: local.tee 1 ; CHECK-NEXT: i64.select ; CHECK-NEXT: local.tee 3 -; CHECK-NEXT: i64.const 0 ; CHECK-NEXT: local.get 3 ; CHECK-NEXT: i64.const 0 -; CHECK-NEXT: i64.ne ; CHECK-NEXT: local.get 2 ; CHECK-NEXT: i64.const 1 ; CHECK-NEXT: local.get 1 @@ -817,9 +791,9 @@ ; CHECK-NEXT: local.tee 2 ; CHECK-NEXT: i64.const 0 ; CHECK-NEXT: i64.gt_s +; CHECK-NEXT: i64.select ; CHECK-NEXT: local.get 2 ; CHECK-NEXT: i64.eqz -; CHECK-NEXT: i32.select ; CHECK-NEXT: i64.select ; CHECK-NEXT: # fallthrough-return entry: @@ -909,35 +883,11 @@ define i64 @utesth_f16i64(half %x) { ; CHECK-LABEL: utesth_f16i64: ; CHECK: .functype utesth_f16i64 (f32) -> (i64) -; CHECK-NEXT: .local i32, i64, i64 ; CHECK-NEXT: # %bb.0: # %entry -; CHECK-NEXT: global.get __stack_pointer -; CHECK-NEXT: i32.const 16 -; CHECK-NEXT: i32.sub -; CHECK-NEXT: local.tee 1 -; CHECK-NEXT: global.set __stack_pointer -; CHECK-NEXT: local.get 1 ; CHECK-NEXT: local.get 0 ; CHECK-NEXT: call __truncsfhf2 ; CHECK-NEXT: call __extendhfsf2 -; CHECK-NEXT: call __fixunssfti -; CHECK-NEXT: local.get 1 -; CHECK-NEXT: i32.const 8 -; CHECK-NEXT: i32.add -; CHECK-NEXT: i64.load 0 -; CHECK-NEXT: local.set 2 -; CHECK-NEXT: local.get 1 -; CHECK-NEXT: i64.load 0 -; CHECK-NEXT: local.set 3 -; CHECK-NEXT: local.get 1 -; CHECK-NEXT: i32.const 16 -; CHECK-NEXT: i32.add -; CHECK-NEXT: global.set __stack_pointer -; CHECK-NEXT: local.get 3 -; CHECK-NEXT: i64.const 0 -; CHECK-NEXT: local.get 2 -; CHECK-NEXT: i64.eqz -; CHECK-NEXT: i64.select +; CHECK-NEXT: i64.trunc_sat_f32_u ; CHECK-NEXT: # fallthrough-return entry: %conv = fptoui half %x to i128 @@ -950,26 +900,11 @@ define i64 @utesth_f16i64_cse(half %x) { ; CHECK-LABEL: utesth_f16i64_cse: ; CHECK: .functype utesth_f16i64_cse (f32) -> (i64) -; CHECK-NEXT: .local i32, i64 ; CHECK-NEXT: # %bb.0: # %entry -; CHECK-NEXT: global.get __stack_pointer -; CHECK-NEXT: i32.const 16 -; CHECK-NEXT: i32.sub -; CHECK-NEXT: local.tee 1 -; CHECK-NEXT: global.set __stack_pointer -; CHECK-NEXT: local.get 1 ; CHECK-NEXT: local.get 0 ; CHECK-NEXT: call __truncsfhf2 ; CHECK-NEXT: call __extendhfsf2 -; CHECK-NEXT: call __fixunssfti -; CHECK-NEXT: local.get 1 -; CHECK-NEXT: i64.load 0 -; CHECK-NEXT: local.set 2 -; CHECK-NEXT: local.get 1 -; CHECK-NEXT: i32.const 16 -; CHECK-NEXT: i32.add -; CHECK-NEXT: global.set __stack_pointer -; CHECK-NEXT: local.get 2 +; CHECK-NEXT: i64.trunc_sat_f32_u ; CHECK-NEXT: # fallthrough-return entry: %conv = fptoui half %x to i128 @@ -1012,10 +947,8 @@ ; CHECK-NEXT: local.tee 1 ; CHECK-NEXT: i64.select ; CHECK-NEXT: local.tee 3 -; CHECK-NEXT: i64.const 0 ; CHECK-NEXT: local.get 3 ; CHECK-NEXT: i64.const 0 -; CHECK-NEXT: i64.ne ; CHECK-NEXT: local.get 2 ; CHECK-NEXT: i64.const 1 ; CHECK-NEXT: local.get 1 @@ -1023,9 +956,9 @@ ; CHECK-NEXT: local.tee 2 ; CHECK-NEXT: i64.const 0 ; CHECK-NEXT: i64.gt_s +; CHECK-NEXT: i64.select ; CHECK-NEXT: local.get 2 ; CHECK-NEXT: i64.eqz -; CHECK-NEXT: i32.select ; CHECK-NEXT: i64.select ; CHECK-NEXT: # fallthrough-return entry: @@ -1386,18 +1319,11 @@ define i16 @utesth_f16i16_mm(half %x) { ; CHECK-LABEL: utesth_f16i16_mm: ; CHECK: .functype utesth_f16i16_mm (f32) -> (i32) -; CHECK-NEXT: .local i32 ; CHECK-NEXT: # %bb.0: # %entry ; CHECK-NEXT: local.get 0 ; CHECK-NEXT: call __truncsfhf2 ; CHECK-NEXT: call __extendhfsf2 ; CHECK-NEXT: i32.trunc_sat_f32_u -; CHECK-NEXT: local.tee 1 -; CHECK-NEXT: i32.const 65535 -; CHECK-NEXT: local.get 1 -; CHECK-NEXT: i32.const 65535 -; CHECK-NEXT: i32.lt_u -; CHECK-NEXT: i32.select ; CHECK-NEXT: # fallthrough-return entry: %conv = fptoui half %x to i32 @@ -1409,24 +1335,11 @@ define i16 @ustest_f16i16_mm(half %x) { ; CHECK-LABEL: ustest_f16i16_mm: ; CHECK: .functype ustest_f16i16_mm (f32) -> (i32) -; CHECK-NEXT: .local i32 ; CHECK-NEXT: # %bb.0: # %entry ; CHECK-NEXT: local.get 0 ; CHECK-NEXT: call __truncsfhf2 ; CHECK-NEXT: call __extendhfsf2 -; CHECK-NEXT: i32.trunc_sat_f32_s -; CHECK-NEXT: local.tee 1 -; CHECK-NEXT: i32.const 65535 -; CHECK-NEXT: local.get 1 -; CHECK-NEXT: i32.const 65535 -; CHECK-NEXT: i32.lt_s -; CHECK-NEXT: i32.select -; CHECK-NEXT: local.tee 1 -; CHECK-NEXT: i32.const 0 -; CHECK-NEXT: local.get 1 -; CHECK-NEXT: i32.const 0 -; CHECK-NEXT: i32.gt_s -; CHECK-NEXT: i32.select +; CHECK-NEXT: i32.trunc_sat_f32_u ; CHECK-NEXT: # fallthrough-return entry: %conv = fptosi half %x to i32 @@ -1690,35 +1603,11 @@ define i64 @utesth_f16i64_mm(half %x) { ; CHECK-LABEL: utesth_f16i64_mm: ; CHECK: .functype utesth_f16i64_mm (f32) -> (i64) -; CHECK-NEXT: .local i32, i64, i64 ; CHECK-NEXT: # %bb.0: # %entry -; CHECK-NEXT: global.get __stack_pointer -; CHECK-NEXT: i32.const 16 -; CHECK-NEXT: i32.sub -; CHECK-NEXT: local.tee 1 -; CHECK-NEXT: global.set __stack_pointer -; CHECK-NEXT: local.get 1 ; CHECK-NEXT: local.get 0 ; CHECK-NEXT: call __truncsfhf2 ; CHECK-NEXT: call __extendhfsf2 -; CHECK-NEXT: call __fixunssfti -; CHECK-NEXT: local.get 1 -; CHECK-NEXT: i32.const 8 -; CHECK-NEXT: i32.add -; CHECK-NEXT: i64.load 0 -; CHECK-NEXT: local.set 2 -; CHECK-NEXT: local.get 1 -; CHECK-NEXT: i64.load 0 -; CHECK-NEXT: local.set 3 -; CHECK-NEXT: local.get 1 -; CHECK-NEXT: i32.const 16 -; CHECK-NEXT: i32.add -; CHECK-NEXT: global.set __stack_pointer -; CHECK-NEXT: local.get 3 -; CHECK-NEXT: i64.const 0 -; CHECK-NEXT: local.get 2 -; CHECK-NEXT: i64.eqz -; CHECK-NEXT: i64.select +; CHECK-NEXT: i64.trunc_sat_f32_u ; CHECK-NEXT: # fallthrough-return entry: %conv = fptoui half %x to i128 @@ -1787,26 +1676,11 @@ define i64 @utesth_f16i64_mm_cse(half %x) { ; CHECK-LABEL: utesth_f16i64_mm_cse: ; CHECK: .functype utesth_f16i64_mm_cse (f32) -> (i64) -; CHECK-NEXT: .local i32, i64 ; CHECK-NEXT: # %bb.0: # %entry -; CHECK-NEXT: global.get __stack_pointer -; CHECK-NEXT: i32.const 16 -; CHECK-NEXT: i32.sub -; CHECK-NEXT: local.tee 1 -; CHECK-NEXT: global.set __stack_pointer -; CHECK-NEXT: local.get 1 ; CHECK-NEXT: local.get 0 ; CHECK-NEXT: call __truncsfhf2 ; CHECK-NEXT: call __extendhfsf2 -; CHECK-NEXT: call __fixunssfti -; CHECK-NEXT: local.get 1 -; CHECK-NEXT: i64.load 0 -; CHECK-NEXT: local.set 2 -; CHECK-NEXT: local.get 1 -; CHECK-NEXT: i32.const 16 -; CHECK-NEXT: i32.add -; CHECK-NEXT: global.set __stack_pointer -; CHECK-NEXT: local.get 2 +; CHECK-NEXT: i64.trunc_sat_f32_u ; CHECK-NEXT: # fallthrough-return entry: %conv = fptoui half %x to i128 Index: llvm/test/CodeGen/WebAssembly/fpclamptosat_vec.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/fpclamptosat_vec.ll +++ llvm/test/CodeGen/WebAssembly/fpclamptosat_vec.ll @@ -518,24 +518,7 @@ define <8 x i16> @utesth_f16i16(<8 x half> %x) { ; CHECK-LABEL: utesth_f16i16: ; CHECK: .functype utesth_f16i16 (f32, f32, f32, f32, f32, f32, f32, f32) -> (v128) -; CHECK-NEXT: .local v128 ; CHECK-NEXT: # %bb.0: # %entry -; CHECK-NEXT: local.get 5 -; CHECK-NEXT: call __truncsfhf2 -; CHECK-NEXT: call __extendhfsf2 -; CHECK-NEXT: local.set 5 -; CHECK-NEXT: local.get 4 -; CHECK-NEXT: call __truncsfhf2 -; CHECK-NEXT: call __extendhfsf2 -; CHECK-NEXT: local.set 4 -; CHECK-NEXT: local.get 6 -; CHECK-NEXT: call __truncsfhf2 -; CHECK-NEXT: call __extendhfsf2 -; CHECK-NEXT: local.set 6 -; CHECK-NEXT: local.get 7 -; CHECK-NEXT: call __truncsfhf2 -; CHECK-NEXT: call __extendhfsf2 -; CHECK-NEXT: local.set 7 ; CHECK-NEXT: local.get 1 ; CHECK-NEXT: call __truncsfhf2 ; CHECK-NEXT: call __extendhfsf2 @@ -544,38 +527,40 @@ ; CHECK-NEXT: call __truncsfhf2 ; CHECK-NEXT: call __extendhfsf2 ; CHECK-NEXT: i32.trunc_sat_f32_u -; CHECK-NEXT: i32x4.splat +; CHECK-NEXT: i16x8.splat ; CHECK-NEXT: local.get 1 ; CHECK-NEXT: i32.trunc_sat_f32_u -; CHECK-NEXT: i32x4.replace_lane 1 +; CHECK-NEXT: i16x8.replace_lane 1 ; CHECK-NEXT: local.get 2 ; CHECK-NEXT: call __truncsfhf2 ; CHECK-NEXT: call __extendhfsf2 ; CHECK-NEXT: i32.trunc_sat_f32_u -; CHECK-NEXT: i32x4.replace_lane 2 +; CHECK-NEXT: i16x8.replace_lane 2 ; CHECK-NEXT: local.get 3 ; CHECK-NEXT: call __truncsfhf2 ; CHECK-NEXT: call __extendhfsf2 ; CHECK-NEXT: i32.trunc_sat_f32_u -; CHECK-NEXT: i32x4.replace_lane 3 -; CHECK-NEXT: v128.const 65535, 65535, 65535, 65535 -; CHECK-NEXT: local.tee 8 -; CHECK-NEXT: i32x4.min_u +; CHECK-NEXT: i16x8.replace_lane 3 ; CHECK-NEXT: local.get 4 +; CHECK-NEXT: call __truncsfhf2 +; CHECK-NEXT: call __extendhfsf2 ; CHECK-NEXT: i32.trunc_sat_f32_u -; CHECK-NEXT: i32x4.splat +; CHECK-NEXT: i16x8.replace_lane 4 ; CHECK-NEXT: local.get 5 +; CHECK-NEXT: call __truncsfhf2 +; CHECK-NEXT: call __extendhfsf2 ; CHECK-NEXT: i32.trunc_sat_f32_u -; CHECK-NEXT: i32x4.replace_lane 1 +; CHECK-NEXT: i16x8.replace_lane 5 ; CHECK-NEXT: local.get 6 +; CHECK-NEXT: call __truncsfhf2 +; CHECK-NEXT: call __extendhfsf2 ; CHECK-NEXT: i32.trunc_sat_f32_u -; CHECK-NEXT: i32x4.replace_lane 2 +; CHECK-NEXT: i16x8.replace_lane 6 ; CHECK-NEXT: local.get 7 +; CHECK-NEXT: call __truncsfhf2 +; CHECK-NEXT: call __extendhfsf2 ; CHECK-NEXT: i32.trunc_sat_f32_u -; CHECK-NEXT: i32x4.replace_lane 3 -; CHECK-NEXT: local.get 8 -; CHECK-NEXT: i32x4.min_u -; CHECK-NEXT: i16x8.narrow_i32x4_u +; CHECK-NEXT: i16x8.replace_lane 7 ; CHECK-NEXT: # fallthrough-return entry: %conv = fptoui <8 x half> %x to <8 x i32> @@ -628,12 +613,12 @@ ; CHECK-NEXT: call __extendhfsf2 ; CHECK-NEXT: i32.trunc_sat_f32_s ; CHECK-NEXT: i32x4.replace_lane 3 -; CHECK-NEXT: v128.const 65535, 65535, 65535, 65535 -; CHECK-NEXT: local.tee 8 -; CHECK-NEXT: i32x4.min_s ; CHECK-NEXT: v128.const 0, 0, 0, 0 -; CHECK-NEXT: local.tee 9 +; CHECK-NEXT: local.tee 8 ; CHECK-NEXT: i32x4.max_s +; CHECK-NEXT: v128.const 65535, 65535, 65535, 65535 +; CHECK-NEXT: local.tee 9 +; CHECK-NEXT: v128.and ; CHECK-NEXT: local.get 4 ; CHECK-NEXT: i32.trunc_sat_f32_s ; CHECK-NEXT: i32x4.splat @@ -647,9 +632,9 @@ ; CHECK-NEXT: i32.trunc_sat_f32_s ; CHECK-NEXT: i32x4.replace_lane 3 ; CHECK-NEXT: local.get 8 -; CHECK-NEXT: i32x4.min_s -; CHECK-NEXT: local.get 9 ; CHECK-NEXT: i32x4.max_s +; CHECK-NEXT: local.get 9 +; CHECK-NEXT: v128.and ; CHECK-NEXT: i16x8.narrow_i32x4_u ; CHECK-NEXT: # fallthrough-return entry: @@ -711,30 +696,36 @@ ; CHECK-NEXT: local.get 5 ; CHECK-NEXT: i64.const 9223372036854775807 ; CHECK-NEXT: i64.lt_u +; CHECK-NEXT: i64.select +; CHECK-NEXT: local.get 5 +; CHECK-NEXT: i64.const 9223372036854775807 ; CHECK-NEXT: local.get 4 ; CHECK-NEXT: i64.const 0 ; CHECK-NEXT: i64.lt_s +; CHECK-NEXT: i64.select ; CHECK-NEXT: local.get 4 ; CHECK-NEXT: i64.eqz -; CHECK-NEXT: i32.select -; CHECK-NEXT: local.tee 1 ; CHECK-NEXT: i64.select ; CHECK-NEXT: local.tee 5 ; CHECK-NEXT: i64.const -9223372036854775808 ; CHECK-NEXT: local.get 5 ; CHECK-NEXT: i64.const -9223372036854775808 ; CHECK-NEXT: i64.gt_u -; CHECK-NEXT: local.get 4 -; CHECK-NEXT: i64.const 0 -; CHECK-NEXT: local.get 1 ; CHECK-NEXT: i64.select +; CHECK-NEXT: local.get 5 +; CHECK-NEXT: i64.const -9223372036854775808 +; CHECK-NEXT: local.get 4 +; CHECK-NEXT: local.get 4 +; CHECK-NEXT: i64.const 63 +; CHECK-NEXT: i64.shr_s +; CHECK-NEXT: i64.and ; CHECK-NEXT: local.tee 4 ; CHECK-NEXT: i64.const -1 ; CHECK-NEXT: i64.gt_s +; CHECK-NEXT: i64.select ; CHECK-NEXT: local.get 4 ; CHECK-NEXT: i64.const -1 ; CHECK-NEXT: i64.eq -; CHECK-NEXT: i32.select ; CHECK-NEXT: i64.select ; CHECK-NEXT: i64x2.splat ; CHECK-NEXT: local.get 3 @@ -742,30 +733,36 @@ ; CHECK-NEXT: local.get 3 ; CHECK-NEXT: i64.const 9223372036854775807 ; CHECK-NEXT: i64.lt_u +; CHECK-NEXT: i64.select +; CHECK-NEXT: local.get 3 +; CHECK-NEXT: i64.const 9223372036854775807 ; CHECK-NEXT: local.get 2 ; CHECK-NEXT: i64.const 0 ; CHECK-NEXT: i64.lt_s +; CHECK-NEXT: i64.select ; CHECK-NEXT: local.get 2 ; CHECK-NEXT: i64.eqz -; CHECK-NEXT: i32.select -; CHECK-NEXT: local.tee 1 ; CHECK-NEXT: i64.select ; CHECK-NEXT: local.tee 4 ; CHECK-NEXT: i64.const -9223372036854775808 ; CHECK-NEXT: local.get 4 ; CHECK-NEXT: i64.const -9223372036854775808 ; CHECK-NEXT: i64.gt_u -; CHECK-NEXT: local.get 2 -; CHECK-NEXT: i64.const 0 -; CHECK-NEXT: local.get 1 ; CHECK-NEXT: i64.select +; CHECK-NEXT: local.get 4 +; CHECK-NEXT: i64.const -9223372036854775808 +; CHECK-NEXT: local.get 2 +; CHECK-NEXT: local.get 2 +; CHECK-NEXT: i64.const 63 +; CHECK-NEXT: i64.shr_s +; CHECK-NEXT: i64.and ; CHECK-NEXT: local.tee 2 ; CHECK-NEXT: i64.const -1 ; CHECK-NEXT: i64.gt_s +; CHECK-NEXT: i64.select ; CHECK-NEXT: local.get 2 ; CHECK-NEXT: i64.const -1 ; CHECK-NEXT: i64.eq -; CHECK-NEXT: i32.select ; CHECK-NEXT: i64.select ; CHECK-NEXT: i64x2.replace_lane 1 ; CHECK-NEXT: # fallthrough-return @@ -892,10 +889,8 @@ ; CHECK-NEXT: local.tee 1 ; CHECK-NEXT: i64.select ; CHECK-NEXT: local.tee 5 -; CHECK-NEXT: i64.const 0 ; CHECK-NEXT: local.get 5 ; CHECK-NEXT: i64.const 0 -; CHECK-NEXT: i64.ne ; CHECK-NEXT: local.get 4 ; CHECK-NEXT: i64.const 1 ; CHECK-NEXT: local.get 1 @@ -903,9 +898,9 @@ ; CHECK-NEXT: local.tee 4 ; CHECK-NEXT: i64.const 0 ; CHECK-NEXT: i64.gt_s +; CHECK-NEXT: i64.select ; CHECK-NEXT: local.get 4 ; CHECK-NEXT: i64.eqz -; CHECK-NEXT: i32.select ; CHECK-NEXT: i64.select ; CHECK-NEXT: i64x2.splat ; CHECK-NEXT: local.get 3 @@ -916,10 +911,8 @@ ; CHECK-NEXT: local.tee 1 ; CHECK-NEXT: i64.select ; CHECK-NEXT: local.tee 4 -; CHECK-NEXT: i64.const 0 ; CHECK-NEXT: local.get 4 ; CHECK-NEXT: i64.const 0 -; CHECK-NEXT: i64.ne ; CHECK-NEXT: local.get 2 ; CHECK-NEXT: i64.const 1 ; CHECK-NEXT: local.get 1 @@ -927,9 +920,9 @@ ; CHECK-NEXT: local.tee 2 ; CHECK-NEXT: i64.const 0 ; CHECK-NEXT: i64.gt_s +; CHECK-NEXT: i64.select ; CHECK-NEXT: local.get 2 ; CHECK-NEXT: i64.eqz -; CHECK-NEXT: i32.select ; CHECK-NEXT: i64.select ; CHECK-NEXT: i64x2.replace_lane 1 ; CHECK-NEXT: # fallthrough-return @@ -990,30 +983,36 @@ ; CHECK-NEXT: local.get 5 ; CHECK-NEXT: i64.const 9223372036854775807 ; CHECK-NEXT: i64.lt_u +; CHECK-NEXT: i64.select +; CHECK-NEXT: local.get 5 +; CHECK-NEXT: i64.const 9223372036854775807 ; CHECK-NEXT: local.get 4 ; CHECK-NEXT: i64.const 0 ; CHECK-NEXT: i64.lt_s +; CHECK-NEXT: i64.select ; CHECK-NEXT: local.get 4 ; CHECK-NEXT: i64.eqz -; CHECK-NEXT: i32.select -; CHECK-NEXT: local.tee 1 ; CHECK-NEXT: i64.select ; CHECK-NEXT: local.tee 5 ; CHECK-NEXT: i64.const -9223372036854775808 ; CHECK-NEXT: local.get 5 ; CHECK-NEXT: i64.const -9223372036854775808 ; CHECK-NEXT: i64.gt_u -; CHECK-NEXT: local.get 4 -; CHECK-NEXT: i64.const 0 -; CHECK-NEXT: local.get 1 ; CHECK-NEXT: i64.select +; CHECK-NEXT: local.get 5 +; CHECK-NEXT: i64.const -9223372036854775808 +; CHECK-NEXT: local.get 4 +; CHECK-NEXT: local.get 4 +; CHECK-NEXT: i64.const 63 +; CHECK-NEXT: i64.shr_s +; CHECK-NEXT: i64.and ; CHECK-NEXT: local.tee 4 ; CHECK-NEXT: i64.const -1 ; CHECK-NEXT: i64.gt_s +; CHECK-NEXT: i64.select ; CHECK-NEXT: local.get 4 ; CHECK-NEXT: i64.const -1 ; CHECK-NEXT: i64.eq -; CHECK-NEXT: i32.select ; CHECK-NEXT: i64.select ; CHECK-NEXT: i64x2.splat ; CHECK-NEXT: local.get 3 @@ -1021,30 +1020,36 @@ ; CHECK-NEXT: local.get 3 ; CHECK-NEXT: i64.const 9223372036854775807 ; CHECK-NEXT: i64.lt_u +; CHECK-NEXT: i64.select +; CHECK-NEXT: local.get 3 +; CHECK-NEXT: i64.const 9223372036854775807 ; CHECK-NEXT: local.get 2 ; CHECK-NEXT: i64.const 0 ; CHECK-NEXT: i64.lt_s +; CHECK-NEXT: i64.select ; CHECK-NEXT: local.get 2 ; CHECK-NEXT: i64.eqz -; CHECK-NEXT: i32.select -; CHECK-NEXT: local.tee 1 ; CHECK-NEXT: i64.select ; CHECK-NEXT: local.tee 4 ; CHECK-NEXT: i64.const -9223372036854775808 ; CHECK-NEXT: local.get 4 ; CHECK-NEXT: i64.const -9223372036854775808 ; CHECK-NEXT: i64.gt_u -; CHECK-NEXT: local.get 2 -; CHECK-NEXT: i64.const 0 -; CHECK-NEXT: local.get 1 ; CHECK-NEXT: i64.select +; CHECK-NEXT: local.get 4 +; CHECK-NEXT: i64.const -9223372036854775808 +; CHECK-NEXT: local.get 2 +; CHECK-NEXT: local.get 2 +; CHECK-NEXT: i64.const 63 +; CHECK-NEXT: i64.shr_s +; CHECK-NEXT: i64.and ; CHECK-NEXT: local.tee 2 ; CHECK-NEXT: i64.const -1 ; CHECK-NEXT: i64.gt_s +; CHECK-NEXT: i64.select ; CHECK-NEXT: local.get 2 ; CHECK-NEXT: i64.const -1 ; CHECK-NEXT: i64.eq -; CHECK-NEXT: i32.select ; CHECK-NEXT: i64.select ; CHECK-NEXT: i64x2.replace_lane 1 ; CHECK-NEXT: # fallthrough-return @@ -1171,10 +1176,8 @@ ; CHECK-NEXT: local.tee 1 ; CHECK-NEXT: i64.select ; CHECK-NEXT: local.tee 5 -; CHECK-NEXT: i64.const 0 ; CHECK-NEXT: local.get 5 ; CHECK-NEXT: i64.const 0 -; CHECK-NEXT: i64.ne ; CHECK-NEXT: local.get 4 ; CHECK-NEXT: i64.const 1 ; CHECK-NEXT: local.get 1 @@ -1182,9 +1185,9 @@ ; CHECK-NEXT: local.tee 4 ; CHECK-NEXT: i64.const 0 ; CHECK-NEXT: i64.gt_s +; CHECK-NEXT: i64.select ; CHECK-NEXT: local.get 4 ; CHECK-NEXT: i64.eqz -; CHECK-NEXT: i32.select ; CHECK-NEXT: i64.select ; CHECK-NEXT: i64x2.splat ; CHECK-NEXT: local.get 3 @@ -1195,10 +1198,8 @@ ; CHECK-NEXT: local.tee 1 ; CHECK-NEXT: i64.select ; CHECK-NEXT: local.tee 4 -; CHECK-NEXT: i64.const 0 ; CHECK-NEXT: local.get 4 ; CHECK-NEXT: i64.const 0 -; CHECK-NEXT: i64.ne ; CHECK-NEXT: local.get 2 ; CHECK-NEXT: i64.const 1 ; CHECK-NEXT: local.get 1 @@ -1206,9 +1207,9 @@ ; CHECK-NEXT: local.tee 2 ; CHECK-NEXT: i64.const 0 ; CHECK-NEXT: i64.gt_s +; CHECK-NEXT: i64.select ; CHECK-NEXT: local.get 2 ; CHECK-NEXT: i64.eqz -; CHECK-NEXT: i32.select ; CHECK-NEXT: i64.select ; CHECK-NEXT: i64x2.replace_lane 1 ; CHECK-NEXT: # fallthrough-return @@ -1271,30 +1272,36 @@ ; CHECK-NEXT: local.get 6 ; CHECK-NEXT: i64.const 9223372036854775807 ; CHECK-NEXT: i64.lt_u +; CHECK-NEXT: i64.select +; CHECK-NEXT: local.get 6 +; CHECK-NEXT: i64.const 9223372036854775807 ; CHECK-NEXT: local.get 5 ; CHECK-NEXT: i64.const 0 ; CHECK-NEXT: i64.lt_s +; CHECK-NEXT: i64.select ; CHECK-NEXT: local.get 5 ; CHECK-NEXT: i64.eqz -; CHECK-NEXT: i32.select -; CHECK-NEXT: local.tee 2 ; CHECK-NEXT: i64.select ; CHECK-NEXT: local.tee 6 ; CHECK-NEXT: i64.const -9223372036854775808 ; CHECK-NEXT: local.get 6 ; CHECK-NEXT: i64.const -9223372036854775808 ; CHECK-NEXT: i64.gt_u -; CHECK-NEXT: local.get 5 -; CHECK-NEXT: i64.const 0 -; CHECK-NEXT: local.get 2 ; CHECK-NEXT: i64.select +; CHECK-NEXT: local.get 6 +; CHECK-NEXT: i64.const -9223372036854775808 +; CHECK-NEXT: local.get 5 +; CHECK-NEXT: local.get 5 +; CHECK-NEXT: i64.const 63 +; CHECK-NEXT: i64.shr_s +; CHECK-NEXT: i64.and ; CHECK-NEXT: local.tee 5 ; CHECK-NEXT: i64.const -1 ; CHECK-NEXT: i64.gt_s +; CHECK-NEXT: i64.select ; CHECK-NEXT: local.get 5 ; CHECK-NEXT: i64.const -1 ; CHECK-NEXT: i64.eq -; CHECK-NEXT: i32.select ; CHECK-NEXT: i64.select ; CHECK-NEXT: i64x2.splat ; CHECK-NEXT: local.get 4 @@ -1302,30 +1309,36 @@ ; CHECK-NEXT: local.get 4 ; CHECK-NEXT: i64.const 9223372036854775807 ; CHECK-NEXT: i64.lt_u +; CHECK-NEXT: i64.select +; CHECK-NEXT: local.get 4 +; CHECK-NEXT: i64.const 9223372036854775807 ; CHECK-NEXT: local.get 3 ; CHECK-NEXT: i64.const 0 ; CHECK-NEXT: i64.lt_s +; CHECK-NEXT: i64.select ; CHECK-NEXT: local.get 3 ; CHECK-NEXT: i64.eqz -; CHECK-NEXT: i32.select -; CHECK-NEXT: local.tee 2 ; CHECK-NEXT: i64.select ; CHECK-NEXT: local.tee 5 ; CHECK-NEXT: i64.const -9223372036854775808 ; CHECK-NEXT: local.get 5 ; CHECK-NEXT: i64.const -9223372036854775808 ; CHECK-NEXT: i64.gt_u -; CHECK-NEXT: local.get 3 -; CHECK-NEXT: i64.const 0 -; CHECK-NEXT: local.get 2 ; CHECK-NEXT: i64.select +; CHECK-NEXT: local.get 5 +; CHECK-NEXT: i64.const -9223372036854775808 +; CHECK-NEXT: local.get 3 +; CHECK-NEXT: local.get 3 +; CHECK-NEXT: i64.const 63 +; CHECK-NEXT: i64.shr_s +; CHECK-NEXT: i64.and ; CHECK-NEXT: local.tee 3 ; CHECK-NEXT: i64.const -1 ; CHECK-NEXT: i64.gt_s +; CHECK-NEXT: i64.select ; CHECK-NEXT: local.get 3 ; CHECK-NEXT: i64.const -1 ; CHECK-NEXT: i64.eq -; CHECK-NEXT: i32.select ; CHECK-NEXT: i64.select ; CHECK-NEXT: i64x2.replace_lane 1 ; CHECK-NEXT: # fallthrough-return @@ -1342,58 +1355,18 @@ define <2 x i64> @utesth_f16i64(<2 x half> %x) { ; CHECK-LABEL: utesth_f16i64: ; CHECK: .functype utesth_f16i64 (f32, f32) -> (v128) -; CHECK-NEXT: .local i32, i64, i64, i64, i64 ; CHECK-NEXT: # %bb.0: # %entry -; CHECK-NEXT: global.get __stack_pointer -; CHECK-NEXT: i32.const 32 -; CHECK-NEXT: i32.sub -; CHECK-NEXT: local.tee 2 -; CHECK-NEXT: global.set __stack_pointer -; CHECK-NEXT: local.get 2 -; CHECK-NEXT: i32.const 16 -; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 1 ; CHECK-NEXT: call __truncsfhf2 ; CHECK-NEXT: call __extendhfsf2 -; CHECK-NEXT: call __fixunssfti -; CHECK-NEXT: local.get 2 +; CHECK-NEXT: local.set 1 ; CHECK-NEXT: local.get 0 ; CHECK-NEXT: call __truncsfhf2 ; CHECK-NEXT: call __extendhfsf2 -; CHECK-NEXT: call __fixunssfti -; CHECK-NEXT: local.get 2 -; CHECK-NEXT: i32.const 16 -; CHECK-NEXT: i32.add -; CHECK-NEXT: i32.const 8 -; CHECK-NEXT: i32.add -; CHECK-NEXT: i64.load 0 -; CHECK-NEXT: local.set 3 -; CHECK-NEXT: local.get 2 -; CHECK-NEXT: i64.load 16 -; CHECK-NEXT: local.set 4 -; CHECK-NEXT: local.get 2 -; CHECK-NEXT: i32.const 8 -; CHECK-NEXT: i32.add -; CHECK-NEXT: i64.load 0 -; CHECK-NEXT: local.set 5 -; CHECK-NEXT: local.get 2 -; CHECK-NEXT: i64.load 0 -; CHECK-NEXT: local.set 6 -; CHECK-NEXT: local.get 2 -; CHECK-NEXT: i32.const 32 -; CHECK-NEXT: i32.add -; CHECK-NEXT: global.set __stack_pointer -; CHECK-NEXT: local.get 6 -; CHECK-NEXT: i64.const 0 -; CHECK-NEXT: local.get 5 -; CHECK-NEXT: i64.eqz -; CHECK-NEXT: i64.select +; CHECK-NEXT: i64.trunc_sat_f32_u ; CHECK-NEXT: i64x2.splat -; CHECK-NEXT: local.get 4 -; CHECK-NEXT: i64.const 0 -; CHECK-NEXT: local.get 3 -; CHECK-NEXT: i64.eqz -; CHECK-NEXT: i64.select +; CHECK-NEXT: local.get 1 +; CHECK-NEXT: i64.trunc_sat_f32_u ; CHECK-NEXT: i64x2.replace_lane 1 ; CHECK-NEXT: # fallthrough-return entry: @@ -1456,10 +1429,8 @@ ; CHECK-NEXT: local.tee 2 ; CHECK-NEXT: i64.select ; CHECK-NEXT: local.tee 6 -; CHECK-NEXT: i64.const 0 ; CHECK-NEXT: local.get 6 ; CHECK-NEXT: i64.const 0 -; CHECK-NEXT: i64.ne ; CHECK-NEXT: local.get 5 ; CHECK-NEXT: i64.const 1 ; CHECK-NEXT: local.get 2 @@ -1467,9 +1438,9 @@ ; CHECK-NEXT: local.tee 5 ; CHECK-NEXT: i64.const 0 ; CHECK-NEXT: i64.gt_s +; CHECK-NEXT: i64.select ; CHECK-NEXT: local.get 5 ; CHECK-NEXT: i64.eqz -; CHECK-NEXT: i32.select ; CHECK-NEXT: i64.select ; CHECK-NEXT: i64x2.splat ; CHECK-NEXT: local.get 4 @@ -1480,10 +1451,8 @@ ; CHECK-NEXT: local.tee 2 ; CHECK-NEXT: i64.select ; CHECK-NEXT: local.tee 5 -; CHECK-NEXT: i64.const 0 ; CHECK-NEXT: local.get 5 ; CHECK-NEXT: i64.const 0 -; CHECK-NEXT: i64.ne ; CHECK-NEXT: local.get 3 ; CHECK-NEXT: i64.const 1 ; CHECK-NEXT: local.get 2 @@ -1491,9 +1460,9 @@ ; CHECK-NEXT: local.tee 3 ; CHECK-NEXT: i64.const 0 ; CHECK-NEXT: i64.gt_s +; CHECK-NEXT: i64.select ; CHECK-NEXT: local.get 3 ; CHECK-NEXT: i64.eqz -; CHECK-NEXT: i32.select ; CHECK-NEXT: i64.select ; CHECK-NEXT: i64x2.replace_lane 1 ; CHECK-NEXT: # fallthrough-return @@ -1999,24 +1968,7 @@ define <8 x i16> @utesth_f16i16_mm(<8 x half> %x) { ; CHECK-LABEL: utesth_f16i16_mm: ; CHECK: .functype utesth_f16i16_mm (f32, f32, f32, f32, f32, f32, f32, f32) -> (v128) -; CHECK-NEXT: .local v128 ; CHECK-NEXT: # %bb.0: # %entry -; CHECK-NEXT: local.get 5 -; CHECK-NEXT: call __truncsfhf2 -; CHECK-NEXT: call __extendhfsf2 -; CHECK-NEXT: local.set 5 -; CHECK-NEXT: local.get 4 -; CHECK-NEXT: call __truncsfhf2 -; CHECK-NEXT: call __extendhfsf2 -; CHECK-NEXT: local.set 4 -; CHECK-NEXT: local.get 6 -; CHECK-NEXT: call __truncsfhf2 -; CHECK-NEXT: call __extendhfsf2 -; CHECK-NEXT: local.set 6 -; CHECK-NEXT: local.get 7 -; CHECK-NEXT: call __truncsfhf2 -; CHECK-NEXT: call __extendhfsf2 -; CHECK-NEXT: local.set 7 ; CHECK-NEXT: local.get 1 ; CHECK-NEXT: call __truncsfhf2 ; CHECK-NEXT: call __extendhfsf2 @@ -2025,38 +1977,40 @@ ; CHECK-NEXT: call __truncsfhf2 ; CHECK-NEXT: call __extendhfsf2 ; CHECK-NEXT: i32.trunc_sat_f32_u -; CHECK-NEXT: i32x4.splat +; CHECK-NEXT: i16x8.splat ; CHECK-NEXT: local.get 1 ; CHECK-NEXT: i32.trunc_sat_f32_u -; CHECK-NEXT: i32x4.replace_lane 1 +; CHECK-NEXT: i16x8.replace_lane 1 ; CHECK-NEXT: local.get 2 ; CHECK-NEXT: call __truncsfhf2 ; CHECK-NEXT: call __extendhfsf2 ; CHECK-NEXT: i32.trunc_sat_f32_u -; CHECK-NEXT: i32x4.replace_lane 2 +; CHECK-NEXT: i16x8.replace_lane 2 ; CHECK-NEXT: local.get 3 ; CHECK-NEXT: call __truncsfhf2 ; CHECK-NEXT: call __extendhfsf2 ; CHECK-NEXT: i32.trunc_sat_f32_u -; CHECK-NEXT: i32x4.replace_lane 3 -; CHECK-NEXT: v128.const 65535, 65535, 65535, 65535 -; CHECK-NEXT: local.tee 8 -; CHECK-NEXT: i32x4.min_u +; CHECK-NEXT: i16x8.replace_lane 3 ; CHECK-NEXT: local.get 4 +; CHECK-NEXT: call __truncsfhf2 +; CHECK-NEXT: call __extendhfsf2 ; CHECK-NEXT: i32.trunc_sat_f32_u -; CHECK-NEXT: i32x4.splat +; CHECK-NEXT: i16x8.replace_lane 4 ; CHECK-NEXT: local.get 5 +; CHECK-NEXT: call __truncsfhf2 +; CHECK-NEXT: call __extendhfsf2 ; CHECK-NEXT: i32.trunc_sat_f32_u -; CHECK-NEXT: i32x4.replace_lane 1 +; CHECK-NEXT: i16x8.replace_lane 5 ; CHECK-NEXT: local.get 6 +; CHECK-NEXT: call __truncsfhf2 +; CHECK-NEXT: call __extendhfsf2 ; CHECK-NEXT: i32.trunc_sat_f32_u -; CHECK-NEXT: i32x4.replace_lane 2 +; CHECK-NEXT: i16x8.replace_lane 6 ; CHECK-NEXT: local.get 7 +; CHECK-NEXT: call __truncsfhf2 +; CHECK-NEXT: call __extendhfsf2 ; CHECK-NEXT: i32.trunc_sat_f32_u -; CHECK-NEXT: i32x4.replace_lane 3 -; CHECK-NEXT: local.get 8 -; CHECK-NEXT: i32x4.min_u -; CHECK-NEXT: i16x8.narrow_i32x4_u +; CHECK-NEXT: i16x8.replace_lane 7 ; CHECK-NEXT: # fallthrough-return entry: %conv = fptoui <8 x half> %x to <8 x i32> @@ -2108,12 +2062,12 @@ ; CHECK-NEXT: call __extendhfsf2 ; CHECK-NEXT: i32.trunc_sat_f32_s ; CHECK-NEXT: i32x4.replace_lane 3 -; CHECK-NEXT: v128.const 65535, 65535, 65535, 65535 -; CHECK-NEXT: local.tee 8 -; CHECK-NEXT: i32x4.min_s ; CHECK-NEXT: v128.const 0, 0, 0, 0 -; CHECK-NEXT: local.tee 9 +; CHECK-NEXT: local.tee 8 ; CHECK-NEXT: i32x4.max_s +; CHECK-NEXT: v128.const 65535, 65535, 65535, 65535 +; CHECK-NEXT: local.tee 9 +; CHECK-NEXT: v128.and ; CHECK-NEXT: local.get 4 ; CHECK-NEXT: i32.trunc_sat_f32_s ; CHECK-NEXT: i32x4.splat @@ -2127,9 +2081,9 @@ ; CHECK-NEXT: i32.trunc_sat_f32_s ; CHECK-NEXT: i32x4.replace_lane 3 ; CHECK-NEXT: local.get 8 -; CHECK-NEXT: i32x4.min_s -; CHECK-NEXT: local.get 9 ; CHECK-NEXT: i32x4.max_s +; CHECK-NEXT: local.get 9 +; CHECK-NEXT: v128.and ; CHECK-NEXT: i16x8.narrow_i32x4_u ; CHECK-NEXT: # fallthrough-return entry: @@ -2836,58 +2790,18 @@ define <2 x i64> @utesth_f16i64_mm(<2 x half> %x) { ; CHECK-LABEL: utesth_f16i64_mm: ; CHECK: .functype utesth_f16i64_mm (f32, f32) -> (v128) -; CHECK-NEXT: .local i32, i64, i64, i64, i64 ; CHECK-NEXT: # %bb.0: # %entry -; CHECK-NEXT: global.get __stack_pointer -; CHECK-NEXT: i32.const 32 -; CHECK-NEXT: i32.sub -; CHECK-NEXT: local.tee 2 -; CHECK-NEXT: global.set __stack_pointer -; CHECK-NEXT: local.get 2 -; CHECK-NEXT: i32.const 16 -; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 1 ; CHECK-NEXT: call __truncsfhf2 ; CHECK-NEXT: call __extendhfsf2 -; CHECK-NEXT: call __fixunssfti -; CHECK-NEXT: local.get 2 +; CHECK-NEXT: local.set 1 ; CHECK-NEXT: local.get 0 ; CHECK-NEXT: call __truncsfhf2 ; CHECK-NEXT: call __extendhfsf2 -; CHECK-NEXT: call __fixunssfti -; CHECK-NEXT: local.get 2 -; CHECK-NEXT: i32.const 16 -; CHECK-NEXT: i32.add -; CHECK-NEXT: i32.const 8 -; CHECK-NEXT: i32.add -; CHECK-NEXT: i64.load 0 -; CHECK-NEXT: local.set 3 -; CHECK-NEXT: local.get 2 -; CHECK-NEXT: i64.load 16 -; CHECK-NEXT: local.set 4 -; CHECK-NEXT: local.get 2 -; CHECK-NEXT: i32.const 8 -; CHECK-NEXT: i32.add -; CHECK-NEXT: i64.load 0 -; CHECK-NEXT: local.set 5 -; CHECK-NEXT: local.get 2 -; CHECK-NEXT: i64.load 0 -; CHECK-NEXT: local.set 6 -; CHECK-NEXT: local.get 2 -; CHECK-NEXT: i32.const 32 -; CHECK-NEXT: i32.add -; CHECK-NEXT: global.set __stack_pointer -; CHECK-NEXT: local.get 6 -; CHECK-NEXT: i64.const 0 -; CHECK-NEXT: local.get 5 -; CHECK-NEXT: i64.eqz -; CHECK-NEXT: i64.select +; CHECK-NEXT: i64.trunc_sat_f32_u ; CHECK-NEXT: i64x2.splat -; CHECK-NEXT: local.get 4 -; CHECK-NEXT: i64.const 0 -; CHECK-NEXT: local.get 3 -; CHECK-NEXT: i64.eqz -; CHECK-NEXT: i64.select +; CHECK-NEXT: local.get 1 +; CHECK-NEXT: i64.trunc_sat_f32_u ; CHECK-NEXT: i64x2.replace_lane 1 ; CHECK-NEXT: # fallthrough-return entry: Index: llvm/test/CodeGen/WebAssembly/funcref-tableget.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/funcref-tableget.ll +++ llvm/test/CodeGen/WebAssembly/funcref-tableget.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s --mtriple=wasm32-unknown-unknown -asm-verbose=false -mattr=+reference-types | FileCheck %s +; RUN: llc < %s -O1 --mtriple=wasm32-unknown-unknown -asm-verbose=false -mattr=+reference-types | FileCheck %s %funcref = type ptr addrspace(20) ;; addrspace 20 is nonintegral Index: llvm/test/CodeGen/WebAssembly/funcref-tableset.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/funcref-tableset.ll +++ llvm/test/CodeGen/WebAssembly/funcref-tableset.ll @@ -1,4 +1,4 @@ -; RUN: llc --mtriple=wasm32-unknown-unknown -asm-verbose=false -mattr=+reference-types < %s | FileCheck %s +; RUN: llc -O1 --mtriple=wasm32-unknown-unknown -asm-verbose=false -mattr=+reference-types < %s | FileCheck %s %funcref = type ptr addrspace(20) ;; addrspace 20 is nonintegral Index: llvm/test/CodeGen/WebAssembly/function-addr-offset.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/function-addr-offset.ll +++ llvm/test/CodeGen/WebAssembly/function-addr-offset.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -verify-machineinstrs | FileCheck %s +; RUN: llc < %s -O1 -verify-machineinstrs | FileCheck %s ; Wasm does not currently support function addresses with offsets, so we ; shouldn't try to create a folded SDNode like (function + offset). This is a Index: llvm/test/CodeGen/WebAssembly/global-get-unlowerable.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/global-get-unlowerable.ll +++ llvm/test/CodeGen/WebAssembly/global-get-unlowerable.ll @@ -1,4 +1,4 @@ -; RUN: not llc < %s --mtriple=wasm32 2>&1 | FileCheck %s +; RUN: not llc < %s -O1 --mtriple=wasm32 2>&1 | FileCheck %s ; Demonstrates a code pattern that could be encountered even with frontend ; restrictions on creating new pointers to globals. In the absence of a better Index: llvm/test/CodeGen/WebAssembly/i128.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/i128.ll +++ llvm/test/CodeGen/WebAssembly/i128.ll @@ -585,55 +585,47 @@ define i128 @masked_rotl(i128 %x, i128 %y) { ; CHECK-LABEL: masked_rotl: ; CHECK: .functype masked_rotl (i32, i64, i64, i64, i64) -> () -; CHECK-NEXT: .local i32, i32 +; CHECK-NEXT: .local i32, i64 ; CHECK-NEXT: # %bb.0: -; CHECK-NEXT: global.get $push13=, __stack_pointer -; CHECK-NEXT: i32.const $push14=, 32 -; CHECK-NEXT: i32.sub $push25=, $pop13, $pop14 -; CHECK-NEXT: local.tee $push24=, 5, $pop25 -; CHECK-NEXT: global.set __stack_pointer, $pop24 -; CHECK-NEXT: local.get $push26=, 5 -; CHECK-NEXT: i32.const $push17=, 16 -; CHECK-NEXT: i32.add $push18=, $pop26, $pop17 -; CHECK-NEXT: local.get $push29=, 1 -; CHECK-NEXT: local.get $push28=, 2 -; CHECK-NEXT: local.get $push27=, 3 -; CHECK-NEXT: i32.wrap_i64 $push0=, $pop27 -; CHECK-NEXT: i32.const $push1=, 127 -; CHECK-NEXT: i32.and $push23=, $pop0, $pop1 -; CHECK-NEXT: local.tee $push22=, 6, $pop23 -; CHECK-NEXT: call __ashlti3, $pop18, $pop29, $pop28, $pop22 -; CHECK-NEXT: local.get $push33=, 5 -; CHECK-NEXT: local.get $push32=, 1 -; CHECK-NEXT: local.get $push31=, 2 -; CHECK-NEXT: i32.const $push2=, 128 -; CHECK-NEXT: local.get $push30=, 6 -; CHECK-NEXT: i32.sub $push3=, $pop2, $pop30 -; CHECK-NEXT: call __lshrti3, $pop33, $pop32, $pop31, $pop3 +; CHECK-NEXT: local.get $push31=, 0 +; CHECK-NEXT: local.get $push25=, 1 +; CHECK-NEXT: local.get $push24=, 2 +; CHECK-NEXT: local.get $push23=, 3 +; CHECK-NEXT: i64.const $push1=, 64 +; CHECK-NEXT: i64.and $push2=, $pop23, $pop1 +; CHECK-NEXT: i64.const $push3=, 6 +; CHECK-NEXT: i64.shr_u $push4=, $pop2, $pop3 +; CHECK-NEXT: i32.wrap_i64 $push22=, $pop4 +; CHECK-NEXT: local.tee $push21=, 5, $pop22 +; CHECK-NEXT: i64.select $push20=, $pop25, $pop24, $pop21 +; CHECK-NEXT: local.tee $push19=, 6, $pop20 +; CHECK-NEXT: local.get $push26=, 3 +; CHECK-NEXT: i64.shl $push8=, $pop19, $pop26 +; CHECK-NEXT: local.get $push29=, 2 +; CHECK-NEXT: local.get $push28=, 1 +; CHECK-NEXT: local.get $push27=, 5 +; CHECK-NEXT: i64.select $push18=, $pop29, $pop28, $pop27 +; CHECK-NEXT: local.tee $push17=, 1, $pop18 +; CHECK-NEXT: i64.const $push5=, 1 +; CHECK-NEXT: i64.shr_u $push6=, $pop17, $pop5 +; CHECK-NEXT: local.get $push30=, 3 +; CHECK-NEXT: i64.const $push0=, -1 +; CHECK-NEXT: i64.xor $push16=, $pop30, $pop0 +; CHECK-NEXT: local.tee $push15=, 2, $pop16 +; CHECK-NEXT: i64.shr_u $push7=, $pop6, $pop15 +; CHECK-NEXT: i64.or $push9=, $pop8, $pop7 +; CHECK-NEXT: i64.store 8($pop31), $pop9 ; CHECK-NEXT: local.get $push36=, 0 -; CHECK-NEXT: local.get $push34=, 5 -; CHECK-NEXT: i32.const $push19=, 16 -; CHECK-NEXT: i32.add $push20=, $pop34, $pop19 -; CHECK-NEXT: i32.const $push4=, 8 -; CHECK-NEXT: i32.add $push5=, $pop20, $pop4 -; CHECK-NEXT: i64.load $push6=, 0($pop5) -; CHECK-NEXT: local.get $push35=, 5 -; CHECK-NEXT: i32.const $push21=, 8 -; CHECK-NEXT: i32.add $push7=, $pop35, $pop21 -; CHECK-NEXT: i64.load $push8=, 0($pop7) -; CHECK-NEXT: i64.or $push9=, $pop6, $pop8 -; CHECK-NEXT: i64.store 8($pop36), $pop9 -; CHECK-NEXT: local.get $push39=, 0 -; CHECK-NEXT: local.get $push37=, 5 -; CHECK-NEXT: i64.load $push10=, 16($pop37) -; CHECK-NEXT: local.get $push38=, 5 -; CHECK-NEXT: i64.load $push11=, 0($pop38) -; CHECK-NEXT: i64.or $push12=, $pop10, $pop11 -; CHECK-NEXT: i64.store 0($pop39), $pop12 -; CHECK-NEXT: local.get $push40=, 5 -; CHECK-NEXT: i32.const $push15=, 32 -; CHECK-NEXT: i32.add $push16=, $pop40, $pop15 -; CHECK-NEXT: global.set __stack_pointer, $pop16 +; CHECK-NEXT: local.get $push33=, 1 +; CHECK-NEXT: local.get $push32=, 3 +; CHECK-NEXT: i64.shl $push12=, $pop33, $pop32 +; CHECK-NEXT: local.get $push34=, 6 +; CHECK-NEXT: i64.const $push14=, 1 +; CHECK-NEXT: i64.shr_u $push10=, $pop34, $pop14 +; CHECK-NEXT: local.get $push35=, 2 +; CHECK-NEXT: i64.shr_u $push11=, $pop10, $pop35 +; CHECK-NEXT: i64.or $push13=, $pop12, $pop11 +; CHECK-NEXT: i64.store 0($pop36), $pop13 ; CHECK-NEXT: return %a = and i128 %y, 127 %z = sub i128 128, %a @@ -704,55 +696,45 @@ define i128 @masked_rotr(i128 %x, i128 %y) { ; CHECK-LABEL: masked_rotr: ; CHECK: .functype masked_rotr (i32, i64, i64, i64, i64) -> () -; CHECK-NEXT: .local i32, i32 +; CHECK-NEXT: .local i32, i64, i64 ; CHECK-NEXT: # %bb.0: -; CHECK-NEXT: global.get $push13=, __stack_pointer -; CHECK-NEXT: i32.const $push14=, 32 -; CHECK-NEXT: i32.sub $push25=, $pop13, $pop14 -; CHECK-NEXT: local.tee $push24=, 5, $pop25 -; CHECK-NEXT: global.set __stack_pointer, $pop24 -; CHECK-NEXT: local.get $push26=, 5 -; CHECK-NEXT: i32.const $push17=, 16 -; CHECK-NEXT: i32.add $push18=, $pop26, $pop17 -; CHECK-NEXT: local.get $push29=, 1 -; CHECK-NEXT: local.get $push28=, 2 -; CHECK-NEXT: local.get $push27=, 3 -; CHECK-NEXT: i32.wrap_i64 $push0=, $pop27 -; CHECK-NEXT: i32.const $push1=, 127 -; CHECK-NEXT: i32.and $push23=, $pop0, $pop1 -; CHECK-NEXT: local.tee $push22=, 6, $pop23 -; CHECK-NEXT: call __lshrti3, $pop18, $pop29, $pop28, $pop22 -; CHECK-NEXT: local.get $push33=, 5 -; CHECK-NEXT: local.get $push32=, 1 -; CHECK-NEXT: local.get $push31=, 2 -; CHECK-NEXT: i32.const $push2=, 128 -; CHECK-NEXT: local.get $push30=, 6 -; CHECK-NEXT: i32.sub $push3=, $pop2, $pop30 -; CHECK-NEXT: call __ashlti3, $pop33, $pop32, $pop31, $pop3 -; CHECK-NEXT: local.get $push36=, 0 -; CHECK-NEXT: local.get $push34=, 5 -; CHECK-NEXT: i32.const $push19=, 16 -; CHECK-NEXT: i32.add $push20=, $pop34, $pop19 -; CHECK-NEXT: i32.const $push4=, 8 -; CHECK-NEXT: i32.add $push5=, $pop20, $pop4 -; CHECK-NEXT: i64.load $push6=, 0($pop5) -; CHECK-NEXT: local.get $push35=, 5 -; CHECK-NEXT: i32.const $push21=, 8 -; CHECK-NEXT: i32.add $push7=, $pop35, $pop21 -; CHECK-NEXT: i64.load $push8=, 0($pop7) -; CHECK-NEXT: i64.or $push9=, $pop6, $pop8 -; CHECK-NEXT: i64.store 8($pop36), $pop9 -; CHECK-NEXT: local.get $push39=, 0 -; CHECK-NEXT: local.get $push37=, 5 -; CHECK-NEXT: i64.load $push10=, 16($pop37) -; CHECK-NEXT: local.get $push38=, 5 -; CHECK-NEXT: i64.load $push11=, 0($pop38) -; CHECK-NEXT: i64.or $push12=, $pop10, $pop11 -; CHECK-NEXT: i64.store 0($pop39), $pop12 -; CHECK-NEXT: local.get $push40=, 5 -; CHECK-NEXT: i32.const $push15=, 32 -; CHECK-NEXT: i32.add $push16=, $pop40, $pop15 -; CHECK-NEXT: global.set __stack_pointer, $pop16 +; CHECK-NEXT: local.get $push29=, 0 +; CHECK-NEXT: local.get $push23=, 1 +; CHECK-NEXT: local.get $push22=, 2 +; CHECK-NEXT: local.get $push21=, 3 +; CHECK-NEXT: i64.const $push1=, 64 +; CHECK-NEXT: i64.and $push2=, $pop21, $pop1 +; CHECK-NEXT: i64.eqz $push20=, $pop2 +; CHECK-NEXT: local.tee $push19=, 5, $pop20 +; CHECK-NEXT: i64.select $push18=, $pop23, $pop22, $pop19 +; CHECK-NEXT: local.tee $push17=, 6, $pop18 +; CHECK-NEXT: i64.const $push3=, 1 +; CHECK-NEXT: i64.shl $push4=, $pop17, $pop3 +; CHECK-NEXT: local.get $push24=, 3 +; CHECK-NEXT: i64.const $push0=, -1 +; CHECK-NEXT: i64.xor $push16=, $pop24, $pop0 +; CHECK-NEXT: local.tee $push15=, 7, $pop16 +; CHECK-NEXT: i64.shl $push5=, $pop4, $pop15 +; CHECK-NEXT: local.get $push27=, 2 +; CHECK-NEXT: local.get $push26=, 1 +; CHECK-NEXT: local.get $push25=, 5 +; CHECK-NEXT: i64.select $push14=, $pop27, $pop26, $pop25 +; CHECK-NEXT: local.tee $push13=, 2, $pop14 +; CHECK-NEXT: local.get $push28=, 3 +; CHECK-NEXT: i64.shr_u $push6=, $pop13, $pop28 +; CHECK-NEXT: i64.or $push7=, $pop5, $pop6 +; CHECK-NEXT: i64.store 8($pop29), $pop7 +; CHECK-NEXT: local.get $push34=, 0 +; CHECK-NEXT: local.get $push30=, 2 +; CHECK-NEXT: i64.const $push12=, 1 +; CHECK-NEXT: i64.shl $push8=, $pop30, $pop12 +; CHECK-NEXT: local.get $push31=, 7 +; CHECK-NEXT: i64.shl $push9=, $pop8, $pop31 +; CHECK-NEXT: local.get $push33=, 6 +; CHECK-NEXT: local.get $push32=, 3 +; CHECK-NEXT: i64.shr_u $push10=, $pop33, $pop32 +; CHECK-NEXT: i64.or $push11=, $pop9, $pop10 +; CHECK-NEXT: i64.store 0($pop34), $pop11 ; CHECK-NEXT: return %a = and i128 %y, 127 %z = sub i128 128, %a Index: llvm/test/CodeGen/WebAssembly/implicit-def.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/implicit-def.ll +++ llvm/test/CodeGen/WebAssembly/implicit-def.ll @@ -1,4 +1,4 @@ -; RUN: llc -o - %s -asm-verbose=false -wasm-keep-registers -disable-wasm-fallthrough-return-opt -mattr=+simd128 | FileCheck %s +; RUN: llc -o - %s -O1 -asm-verbose=false -wasm-keep-registers -disable-wasm-fallthrough-return-opt -mattr=+simd128 | FileCheck %s target triple = "wasm32-unknown-unknown" Index: llvm/test/CodeGen/WebAssembly/indirect-import.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/indirect-import.ll +++ llvm/test/CodeGen/WebAssembly/indirect-import.ll @@ -1,5 +1,5 @@ -; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-keep-registers -verify-machineinstrs | FileCheck %s -; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-keep-registers -verify-machineinstrs -fast-isel | FileCheck %s +; RUN: llc < %s -O1 -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-keep-registers -verify-machineinstrs | FileCheck %s +; RUN: llc < %s -O1 -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-keep-registers -verify-machineinstrs -fast-isel | FileCheck %s ; ModuleID = 'test/dot_s/indirect-import.c' source_filename = "test/dot_s/indirect-import.c" Index: llvm/test/CodeGen/WebAssembly/indirectbr.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/indirectbr.ll +++ llvm/test/CodeGen/WebAssembly/indirectbr.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers | FileCheck %s +; RUN: llc < %s -O0 -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers | FileCheck %s ; This tests that indirectbr instructions are lowered to switches. Currently we ; just re-use the IndirectBrExpand Pass; it has its own IR-level test. Index: llvm/test/CodeGen/WebAssembly/ir-locals-stackid.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/ir-locals-stackid.ll +++ llvm/test/CodeGen/WebAssembly/ir-locals-stackid.ll @@ -1,5 +1,5 @@ -; RUN: llc -mtriple=wasm32-unknown-unknown -asm-verbose=false < %s | FileCheck %s --check-prefix=CHECKCG -; RUN: llc -mtriple=wasm32-unknown-unknown -stop-after=finalize-isel < %s | FileCheck %s --check-prefix=CHECKISEL +; RUN: llc -O1 -mtriple=wasm32-unknown-unknown -asm-verbose=false < %s | FileCheck %s --check-prefix=CHECKCG +; RUN: llc -O1 -mtriple=wasm32-unknown-unknown -stop-after=finalize-isel < %s | FileCheck %s --check-prefix=CHECKISEL %f32_cell = type ptr addrspace(1) Index: llvm/test/CodeGen/WebAssembly/ir-locals.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/ir-locals.ll +++ llvm/test/CodeGen/WebAssembly/ir-locals.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s --mtriple=wasm32-unknown-unknown -asm-verbose=false | FileCheck %s +; RUN: llc < %s -O1 --mtriple=wasm32-unknown-unknown -asm-verbose=false | FileCheck %s %i32_cell = type ptr addrspace(1) %i64_cell = type ptr addrspace(1) Index: llvm/test/CodeGen/WebAssembly/libcalls.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/libcalls.ll +++ llvm/test/CodeGen/WebAssembly/libcalls.ll @@ -1,5 +1,5 @@ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py -; RUN: llc < %s -disable-wasm-fallthrough-return-opt -wasm-keep-registers | FileCheck %s +; RUN: llc < %s -O1 -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-keep-registers | FileCheck %s ; Test a subset of compiler-rt/libm libcalls expected to be emitted by the wasm backend @@ -24,139 +24,6 @@ define fp128 @fp128libcalls(fp128 %x, fp128 %y, i32 %z) { ; compiler-rt call -; CHECK-LABEL: fp128libcalls: -; CHECK: .functype fp128libcalls (i32, i64, i64, i64, i64, i32) -> () -; CHECK-NEXT: .local i32 -; CHECK-NEXT: # %bb.0: -; CHECK-NEXT: global.get $push28=, __stack_pointer -; CHECK-NEXT: i32.const $push29=, 144 -; CHECK-NEXT: i32.sub $push73=, $pop28, $pop29 -; CHECK-NEXT: local.tee $push72=, 6, $pop73 -; CHECK-NEXT: global.set __stack_pointer, $pop72 -; CHECK-NEXT: local.get $push74=, 6 -; CHECK-NEXT: i32.const $push32=, 128 -; CHECK-NEXT: i32.add $push33=, $pop74, $pop32 -; CHECK-NEXT: local.get $push78=, 1 -; CHECK-NEXT: local.get $push77=, 2 -; CHECK-NEXT: local.get $push76=, 3 -; CHECK-NEXT: local.get $push75=, 4 -; CHECK-NEXT: call __addtf3, $pop33, $pop78, $pop77, $pop76, $pop75 -; CHECK-NEXT: local.get $push79=, 6 -; CHECK-NEXT: i32.const $push36=, 112 -; CHECK-NEXT: i32.add $push37=, $pop79, $pop36 -; CHECK-NEXT: local.get $push80=, 6 -; CHECK-NEXT: i64.load $push3=, 128($pop80) -; CHECK-NEXT: local.get $push81=, 6 -; CHECK-NEXT: i32.const $push34=, 128 -; CHECK-NEXT: i32.add $push35=, $pop81, $pop34 -; CHECK-NEXT: i32.const $push0=, 8 -; CHECK-NEXT: i32.add $push1=, $pop35, $pop0 -; CHECK-NEXT: i64.load $push2=, 0($pop1) -; CHECK-NEXT: local.get $push83=, 3 -; CHECK-NEXT: local.get $push82=, 4 -; CHECK-NEXT: call __multf3, $pop37, $pop3, $pop2, $pop83, $pop82 -; CHECK-NEXT: local.get $push84=, 6 -; CHECK-NEXT: i32.const $push40=, 96 -; CHECK-NEXT: i32.add $push41=, $pop84, $pop40 -; CHECK-NEXT: local.get $push85=, 6 -; CHECK-NEXT: i64.load $push6=, 112($pop85) -; CHECK-NEXT: local.get $push86=, 6 -; CHECK-NEXT: i32.const $push38=, 112 -; CHECK-NEXT: i32.add $push39=, $pop86, $pop38 -; CHECK-NEXT: i32.const $push71=, 8 -; CHECK-NEXT: i32.add $push4=, $pop39, $pop71 -; CHECK-NEXT: i64.load $push5=, 0($pop4) -; CHECK-NEXT: local.get $push88=, 3 -; CHECK-NEXT: local.get $push87=, 4 -; CHECK-NEXT: call __divtf3, $pop41, $pop6, $pop5, $pop88, $pop87 -; CHECK-NEXT: local.get $push89=, 6 -; CHECK-NEXT: i32.const $push44=, 80 -; CHECK-NEXT: i32.add $push45=, $pop89, $pop44 -; CHECK-NEXT: local.get $push90=, 6 -; CHECK-NEXT: i64.load $push9=, 96($pop90) -; CHECK-NEXT: local.get $push91=, 6 -; CHECK-NEXT: i32.const $push42=, 96 -; CHECK-NEXT: i32.add $push43=, $pop91, $pop42 -; CHECK-NEXT: i32.const $push70=, 8 -; CHECK-NEXT: i32.add $push7=, $pop43, $pop70 -; CHECK-NEXT: i64.load $push8=, 0($pop7) -; CHECK-NEXT: call sqrtl, $pop45, $pop9, $pop8 -; CHECK-NEXT: local.get $push92=, 6 -; CHECK-NEXT: i32.const $push48=, 64 -; CHECK-NEXT: i32.add $push49=, $pop92, $pop48 -; CHECK-NEXT: local.get $push93=, 6 -; CHECK-NEXT: i64.load $push12=, 80($pop93) -; CHECK-NEXT: local.get $push94=, 6 -; CHECK-NEXT: i32.const $push46=, 80 -; CHECK-NEXT: i32.add $push47=, $pop94, $pop46 -; CHECK-NEXT: i32.const $push69=, 8 -; CHECK-NEXT: i32.add $push10=, $pop47, $pop69 -; CHECK-NEXT: i64.load $push11=, 0($pop10) -; CHECK-NEXT: call floorl, $pop49, $pop12, $pop11 -; CHECK-NEXT: local.get $push95=, 6 -; CHECK-NEXT: i32.const $push52=, 48 -; CHECK-NEXT: i32.add $push53=, $pop95, $pop52 -; CHECK-NEXT: local.get $push96=, 6 -; CHECK-NEXT: i64.load $push15=, 64($pop96) -; CHECK-NEXT: local.get $push97=, 6 -; CHECK-NEXT: i32.const $push50=, 64 -; CHECK-NEXT: i32.add $push51=, $pop97, $pop50 -; CHECK-NEXT: i32.const $push68=, 8 -; CHECK-NEXT: i32.add $push13=, $pop51, $pop68 -; CHECK-NEXT: i64.load $push14=, 0($pop13) -; CHECK-NEXT: local.get $push99=, 3 -; CHECK-NEXT: local.get $push98=, 4 -; CHECK-NEXT: call powl, $pop53, $pop15, $pop14, $pop99, $pop98 -; CHECK-NEXT: local.get $push100=, 6 -; CHECK-NEXT: i32.const $push56=, 32 -; CHECK-NEXT: i32.add $push57=, $pop100, $pop56 -; CHECK-NEXT: local.get $push101=, 6 -; CHECK-NEXT: i64.load $push18=, 48($pop101) -; CHECK-NEXT: local.get $push102=, 6 -; CHECK-NEXT: i32.const $push54=, 48 -; CHECK-NEXT: i32.add $push55=, $pop102, $pop54 -; CHECK-NEXT: i32.const $push67=, 8 -; CHECK-NEXT: i32.add $push16=, $pop55, $pop67 -; CHECK-NEXT: i64.load $push17=, 0($pop16) -; CHECK-NEXT: local.get $push103=, 5 -; CHECK-NEXT: call __powitf2, $pop57, $pop18, $pop17, $pop103 -; CHECK-NEXT: local.get $push104=, 6 -; CHECK-NEXT: i32.const $push60=, 16 -; CHECK-NEXT: i32.add $push61=, $pop104, $pop60 -; CHECK-NEXT: local.get $push105=, 6 -; CHECK-NEXT: i64.load $push21=, 32($pop105) -; CHECK-NEXT: local.get $push106=, 6 -; CHECK-NEXT: i32.const $push58=, 32 -; CHECK-NEXT: i32.add $push59=, $pop106, $pop58 -; CHECK-NEXT: i32.const $push66=, 8 -; CHECK-NEXT: i32.add $push19=, $pop59, $pop66 -; CHECK-NEXT: i64.load $push20=, 0($pop19) -; CHECK-NEXT: call truncl, $pop61, $pop21, $pop20 -; CHECK-NEXT: local.get $push109=, 6 -; CHECK-NEXT: local.get $push107=, 6 -; CHECK-NEXT: i64.load $push24=, 16($pop107) -; CHECK-NEXT: local.get $push108=, 6 -; CHECK-NEXT: i32.const $push62=, 16 -; CHECK-NEXT: i32.add $push63=, $pop108, $pop62 -; CHECK-NEXT: i32.const $push65=, 8 -; CHECK-NEXT: i32.add $push22=, $pop63, $pop65 -; CHECK-NEXT: i64.load $push23=, 0($pop22) -; CHECK-NEXT: call nearbyintl, $pop109, $pop24, $pop23 -; CHECK-NEXT: local.get $push111=, 0 -; CHECK-NEXT: local.get $push110=, 6 -; CHECK-NEXT: i32.const $push64=, 8 -; CHECK-NEXT: i32.add $push25=, $pop110, $pop64 -; CHECK-NEXT: i64.load $push26=, 0($pop25) -; CHECK-NEXT: i64.store 8($pop111), $pop26 -; CHECK-NEXT: local.get $push113=, 0 -; CHECK-NEXT: local.get $push112=, 6 -; CHECK-NEXT: i64.load $push27=, 0($pop112) -; CHECK-NEXT: i64.store 0($pop113), $pop27 -; CHECK-NEXT: local.get $push114=, 6 -; CHECK-NEXT: i32.const $push30=, 144 -; CHECK-NEXT: i32.add $push31=, $pop114, $pop30 -; CHECK-NEXT: global.set __stack_pointer, $pop31 -; CHECK-NEXT: return %a = fadd fp128 %x, %y %b = fmul fp128 %a, %y %c = fdiv fp128 %b, %y @@ -172,60 +39,6 @@ define i128 @i128libcalls(i128 %x, i128 %y) { ; Basic ops should be expanded -; CHECK-LABEL: i128libcalls: -; CHECK: .functype i128libcalls (i32, i64, i64, i64, i64) -> () -; CHECK-NEXT: .local i32, i64 -; CHECK-NEXT: # %bb.0: -; CHECK-NEXT: global.get $push11=, __stack_pointer -; CHECK-NEXT: i32.const $push12=, 32 -; CHECK-NEXT: i32.sub $push23=, $pop11, $pop12 -; CHECK-NEXT: local.tee $push22=, 5, $pop23 -; CHECK-NEXT: global.set __stack_pointer, $pop22 -; CHECK-NEXT: local.get $push24=, 5 -; CHECK-NEXT: i32.const $push15=, 16 -; CHECK-NEXT: i32.add $push16=, $pop24, $pop15 -; CHECK-NEXT: local.get $push26=, 1 -; CHECK-NEXT: local.get $push25=, 3 -; CHECK-NEXT: i64.add $push21=, $pop26, $pop25 -; CHECK-NEXT: local.tee $push20=, 6, $pop21 -; CHECK-NEXT: local.get $push28=, 2 -; CHECK-NEXT: local.get $push27=, 4 -; CHECK-NEXT: i64.add $push0=, $pop28, $pop27 -; CHECK-NEXT: local.get $push30=, 6 -; CHECK-NEXT: local.get $push29=, 1 -; CHECK-NEXT: i64.lt_u $push1=, $pop30, $pop29 -; CHECK-NEXT: i64.extend_i32_u $push2=, $pop1 -; CHECK-NEXT: i64.add $push3=, $pop0, $pop2 -; CHECK-NEXT: local.get $push32=, 3 -; CHECK-NEXT: local.get $push31=, 4 -; CHECK-NEXT: call __multi3, $pop16, $pop20, $pop3, $pop32, $pop31 -; CHECK-NEXT: local.get $push37=, 5 -; CHECK-NEXT: local.get $push33=, 5 -; CHECK-NEXT: i64.load $push7=, 16($pop33) -; CHECK-NEXT: local.get $push34=, 5 -; CHECK-NEXT: i32.const $push17=, 16 -; CHECK-NEXT: i32.add $push18=, $pop34, $pop17 -; CHECK-NEXT: i32.const $push4=, 8 -; CHECK-NEXT: i32.add $push5=, $pop18, $pop4 -; CHECK-NEXT: i64.load $push6=, 0($pop5) -; CHECK-NEXT: local.get $push36=, 3 -; CHECK-NEXT: local.get $push35=, 4 -; CHECK-NEXT: call __umodti3, $pop37, $pop7, $pop6, $pop36, $pop35 -; CHECK-NEXT: local.get $push39=, 0 -; CHECK-NEXT: local.get $push38=, 5 -; CHECK-NEXT: i32.const $push19=, 8 -; CHECK-NEXT: i32.add $push8=, $pop38, $pop19 -; CHECK-NEXT: i64.load $push9=, 0($pop8) -; CHECK-NEXT: i64.store 8($pop39), $pop9 -; CHECK-NEXT: local.get $push41=, 0 -; CHECK-NEXT: local.get $push40=, 5 -; CHECK-NEXT: i64.load $push10=, 0($pop40) -; CHECK-NEXT: i64.store 0($pop41), $pop10 -; CHECK-NEXT: local.get $push42=, 5 -; CHECK-NEXT: i32.const $push13=, 32 -; CHECK-NEXT: i32.add $push14=, $pop42, $pop13 -; CHECK-NEXT: global.set __stack_pointer, $pop14 -; CHECK-NEXT: return %a = add i128 %x, %y %b = mul i128 %a, %y %c = urem i128 %b, %y @@ -233,21 +46,6 @@ } define i32 @f64libcalls(double %x, double %y, i32 %z) { -; CHECK-LABEL: f64libcalls: -; CHECK: .functype f64libcalls (f64, f64, i32) -> (i32) -; CHECK-NEXT: # %bb.0: -; CHECK-NEXT: local.get $push8=, 0 -; CHECK-NEXT: call $push0=, cos, $pop8 -; CHECK-NEXT: call $push1=, log10, $pop0 -; CHECK-NEXT: local.get $push9=, 1 -; CHECK-NEXT: call $push2=, pow, $pop1, $pop9 -; CHECK-NEXT: local.get $push10=, 2 -; CHECK-NEXT: call $push3=, __powidf2, $pop2, $pop10 -; CHECK-NEXT: call $push4=, log, $pop3 -; CHECK-NEXT: call $push5=, exp, $pop4 -; CHECK-NEXT: call $push6=, cbrt, $pop5 -; CHECK-NEXT: call $push7=, lround, $pop6 -; CHECK-NEXT: return $pop7 %a = call double @llvm.cos.f64(double %x) %b = call double @llvm.log10.f64(double %a) %c = call double @llvm.pow.f64(double %b, double %y) @@ -264,25 +62,6 @@ ; no libcalls are needed for f32 and f64 define i1 @unordd(double %x, double %y) { -; CHECK-LABEL: unordd: -; CHECK: .functype unordd (f64, f64) -> (i32) -; CHECK-NEXT: # %bb.0: -; CHECK-NEXT: local.get $push8=, 0 -; CHECK-NEXT: local.get $push7=, 0 -; CHECK-NEXT: f64.ne $push4=, $pop8, $pop7 -; CHECK-NEXT: local.get $push10=, 1 -; CHECK-NEXT: local.get $push9=, 1 -; CHECK-NEXT: f64.ne $push3=, $pop10, $pop9 -; CHECK-NEXT: i32.or $push5=, $pop4, $pop3 -; CHECK-NEXT: local.get $push12=, 0 -; CHECK-NEXT: local.get $push11=, 0 -; CHECK-NEXT: f64.eq $push1=, $pop12, $pop11 -; CHECK-NEXT: local.get $push14=, 1 -; CHECK-NEXT: local.get $push13=, 1 -; CHECK-NEXT: f64.eq $push0=, $pop14, $pop13 -; CHECK-NEXT: i32.and $push2=, $pop1, $pop0 -; CHECK-NEXT: i32.xor $push6=, $pop5, $pop2 -; CHECK-NEXT: return $pop6 %a = fcmp uno double %x, %y %b = fcmp ord double %x, %y %c = xor i1 %a, %b @@ -290,25 +69,6 @@ } define i1 @unordf(float %x, float %y) { -; CHECK-LABEL: unordf: -; CHECK: .functype unordf (f32, f32) -> (i32) -; CHECK-NEXT: # %bb.0: -; CHECK-NEXT: local.get $push8=, 0 -; CHECK-NEXT: local.get $push7=, 0 -; CHECK-NEXT: f32.ne $push4=, $pop8, $pop7 -; CHECK-NEXT: local.get $push10=, 1 -; CHECK-NEXT: local.get $push9=, 1 -; CHECK-NEXT: f32.ne $push3=, $pop10, $pop9 -; CHECK-NEXT: i32.or $push5=, $pop4, $pop3 -; CHECK-NEXT: local.get $push12=, 0 -; CHECK-NEXT: local.get $push11=, 0 -; CHECK-NEXT: f32.eq $push1=, $pop12, $pop11 -; CHECK-NEXT: local.get $push14=, 1 -; CHECK-NEXT: local.get $push13=, 1 -; CHECK-NEXT: f32.eq $push0=, $pop14, $pop13 -; CHECK-NEXT: i32.and $push2=, $pop1, $pop0 -; CHECK-NEXT: i32.xor $push6=, $pop5, $pop2 -; CHECK-NEXT: return $pop6 %a = fcmp uno float %x, %y %b = fcmp ord float %x, %y %c = xor i1 %a, %b @@ -316,32 +76,13 @@ } define i1 @unordt(fp128 %x, fp128 %y) { -; CHECK-LABEL: unordt: -; CHECK: .functype unordt (i64, i64, i64, i64) -> (i32) -; CHECK-NEXT: # %bb.0: -; CHECK-NEXT: local.get $push6=, 0 -; CHECK-NEXT: local.get $push5=, 1 -; CHECK-NEXT: local.get $push4=, 2 -; CHECK-NEXT: local.get $push3=, 3 -; CHECK-NEXT: call $push1=, __unordtf2, $pop6, $pop5, $pop4, $pop3 -; CHECK-NEXT: i32.const $push0=, 0 -; CHECK-NEXT: i32.ne $push2=, $pop1, $pop0 -; CHECK-NEXT: return $pop2 %a = fcmp uno fp128 %x, %y ret i1 %a } define i1 @ordt(fp128 %x, fp128 %y) { -; CHECK-LABEL: ordt: -; CHECK: .functype ordt (i64, i64, i64, i64) -> (i32) -; CHECK-NEXT: # %bb.0: -; CHECK-NEXT: local.get $push5=, 0 -; CHECK-NEXT: local.get $push4=, 1 -; CHECK-NEXT: local.get $push3=, 2 -; CHECK-NEXT: local.get $push2=, 3 -; CHECK-NEXT: call $push0=, __unordtf2, $pop5, $pop4, $pop3, $pop2 -; CHECK-NEXT: i32.eqz $push1=, $pop0 -; CHECK-NEXT: return $pop1 %a = fcmp ord fp128 %x, %y ret i1 %a } +;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: +; CHECK: {{.*}} Index: llvm/test/CodeGen/WebAssembly/load-store-pic.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/load-store-pic.ll +++ llvm/test/CodeGen/WebAssembly/load-store-pic.ll @@ -35,9 +35,7 @@ ; PIC: global.get $push[[L0:[0-9]+]]=, __memory_base{{$}} ; PIC-NEXT: [[PTR]].const $push[[L1:[0-9]+]]=, hidden_global_array@MBREL{{$}} ; PIC-NEXT: [[PTR]].add $push[[L2:[0-9]+]]=, $pop[[L0]], $pop[[L1:[0-9]+]]{{$}} -; PIC-NEXT: [[PTR]].const $push[[L3:[0-9]+]]=, 20{{$}} -; PIC-NEXT: [[PTR]].add $push[[L4:[0-9]+]]=, $pop[[L2]], $pop[[L3]]{{$}} -; PIC-NEXT: i32.load $push{{[0-9]+}}=, 0($pop[[L4]]){{$}} +; PIC-NEXT: i32.load $push{{[0-9]+}}=, 20($pop[[L2]]){{$}} ; CHECK-NEXT: end_function %1 = getelementptr [10 x i32], ptr @hidden_global_array, i32 0, i32 5 @@ -50,10 +48,10 @@ define void @store_hidden_global(i32 %n) { ; CHECK-LABEL: store_hidden_global: ; PIC: global.get $push[[L0:[0-9]+]]=, __memory_base{{$}} -; PIC-NEXT: [[PTR]].const $push[[L1:[0-9]+]]=, hidden_global@MBREL{{$}} +; PIC-NEXT: [[PTR]].const $push[[L1:[0-9]+]]=, hidden_global@MBREL ; PIC-NEXT: [[PTR]].add $push[[L2:[0-9]+]]=, $pop[[L0]], $pop[[L1]]{{$}} ; PIC-NEXT: i32.store 0($pop[[L2]]), $0{{$}} -; CHECK-NEXT: end_function +; CHECK-NEXT: end_function store i32 %n, ptr @hidden_global ret void @@ -64,9 +62,7 @@ ; PIC: global.get $push[[L0:[0-9]+]]=, __memory_base{{$}} ; PIC-NEXT: [[PTR]].const $push[[L1:[0-9]+]]=, hidden_global_array@MBREL{{$}} ; PIC-NEXT: [[PTR]].add $push[[L2:[0-9]+]]=, $pop[[L0]], $pop[[L1]]{{$}} -; PIC-NEXT: [[PTR]].const $push[[L3:[0-9]+]]=, 20{{$}} -; PIC-NEXT: [[PTR]].add $push[[L4:[0-9]+]]=, $pop[[L2]], $pop[[L3]]{{$}} -; PIC-NEXT: i32.store 0($pop[[L4]]), $0{{$}} +; PIC-NEXT: i32.store 20($pop[[L2]]), $0{{$}} ; CHECK-NEXT: end_function @@ -93,9 +89,7 @@ define i32 @load_external_global_offset() { ; CHECK-LABEL: load_external_global_offset: ; PIC: global.get $push[[L0:[0-9]+]]=, external_global_array@GOT{{$}} -; PIC-NEXT: [[PTR]].const $push[[L1:[0-9]+]]=, 20{{$}} -; PIC-NEXT: [[PTR]].add $push[[L2:[0-9]+]]=, $pop[[L0]], $pop[[L1]]{{$}} -; PIC-NEXT: i32.load $push{{[0-9]+}}=, 0($pop[[L2]]){{$}} +; PIC-NEXT: i32.load $push{{[0-9]+}}=, 20($pop[[L0]]){{$}} ; CHECK-NEXT: end_function @@ -120,9 +114,7 @@ define void @store_external_global_offset(i32 %n) { ; CHECK-LABEL: store_external_global_offset: ; PIC: global.get $push[[L0:[0-9]+]]=, external_global_array@GOT{{$}} -; PIC-NEXT: [[PTR]].const $push[[L1:[0-9]+]]=, 20{{$}} -; PIC-NEXT: [[PTR]].add $push[[L2:[0-9]+]]=, $pop[[L0]], $pop[[L1]]{{$}} -; PIC-NEXT: i32.store 0($pop[[L2]]), $0{{$}} +; PIC-NEXT: i32.store 20($pop[[L0]]), $0{{$}} ; CHECK-NEXT: end_function Index: llvm/test/CodeGen/WebAssembly/mem-intrinsics.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/mem-intrinsics.ll +++ llvm/test/CodeGen/WebAssembly/mem-intrinsics.ll @@ -74,22 +74,6 @@ ; CHECK-LABEL: frame_index: ; CHECK: .functype frame_index () -> () ; CHECK-NEXT: # %bb.0: # %entry -; CHECK-NEXT: global.get $push3=, __stack_pointer -; CHECK-NEXT: i32.const $push4=, 4096 -; CHECK-NEXT: i32.sub $push12=, $pop3, $pop4 -; CHECK-NEXT: local.tee $push11=, $0=, $pop12 -; CHECK-NEXT: global.set __stack_pointer, $pop11 -; CHECK-NEXT: i32.const $push7=, 2048 -; CHECK-NEXT: i32.add $push8=, $0, $pop7 -; CHECK-NEXT: i32.const $push1=, 0 -; CHECK-NEXT: i32.const $push0=, 1024 -; CHECK-NEXT: call $drop=, memset, $pop8, $pop1, $pop0 -; CHECK-NEXT: i32.const $push10=, 0 -; CHECK-NEXT: i32.const $push9=, 1024 -; CHECK-NEXT: call $push2=, memset, $0, $pop10, $pop9 -; CHECK-NEXT: i32.const $push5=, 4096 -; CHECK-NEXT: i32.add $push6=, $pop2, $pop5 -; CHECK-NEXT: global.set __stack_pointer, $pop6 ; CHECK-NEXT: return entry: %a = alloca [2048 x i8], align 16 Index: llvm/test/CodeGen/WebAssembly/offset-fastisel.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/offset-fastisel.ll +++ llvm/test/CodeGen/WebAssembly/offset-fastisel.ll @@ -22,13 +22,6 @@ ; CHECK-LABEL: store_i8_with_array_alloca_gep: ; CHECK: .functype store_i8_with_array_alloca_gep (i32) -> () ; CHECK-NEXT: # %bb.0: -; CHECK-NEXT: global.get $push3=, __stack_pointer -; CHECK-NEXT: i32.const $push4=, 32 -; CHECK-NEXT: i32.sub $push5=, $pop3, $pop4 -; CHECK-NEXT: local.copy $push1=, $pop5 -; CHECK-NEXT: i32.add $push2=, $pop1, $0 -; CHECK-NEXT: i32.const $push0=, 0 -; CHECK-NEXT: i32.store8 0($pop2), $pop0 ; CHECK-NEXT: # fallthrough-return %A = alloca [30 x i8], align 16 %s = getelementptr inbounds [30 x i8], ptr %A, i32 0, i32 %idx Index: llvm/test/CodeGen/WebAssembly/pr47375.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/pr47375.ll +++ llvm/test/CodeGen/WebAssembly/pr47375.ll @@ -7,20 +7,21 @@ ; because WebAssemblyTargetLowering::isVectorLoadExtDesirable was ; improperly assuming the use of simple value types. -define void @sext_vec() { +define void @sext_vec(ptr %arg) { ; CHECK-LABEL: sext_vec: -; CHECK: .functype sext_vec () -> () +; CHECK: .functype sext_vec (i32) -> () ; CHECK-NEXT: .local i32 ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.load8_u 0 -; CHECK-NEXT: local.set 0 -; CHECK-NEXT: local.get 0 +; CHECK-NEXT: i32.const 2 +; CHECK-NEXT: i32.add ; CHECK-NEXT: i32.const 0 ; CHECK-NEXT: i32.store8 0 ; CHECK-NEXT: local.get 0 ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: local.get 0 +; CHECK-NEXT: i32.load8_u 0 +; CHECK-NEXT: local.tee 1 +; CHECK-NEXT: local.get 1 ; CHECK-NEXT: i32.const 7 ; CHECK-NEXT: i32.shl ; CHECK-NEXT: i32.or @@ -28,8 +29,8 @@ ; CHECK-NEXT: i32.and ; CHECK-NEXT: i32.store16 0 ; CHECK-NEXT: # fallthrough-return - %L1 = load <2 x i3>, ptr undef, align 2 + %L1 = load <2 x i3>, ptr %arg, align 2 %zext = zext <2 x i3> %L1 to <2 x i10> - store <2 x i10> %zext, ptr undef, align 4 + store <2 x i10> %zext, ptr %arg, align 4 ret void } Index: llvm/test/CodeGen/WebAssembly/pr59626.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/pr59626.ll +++ llvm/test/CodeGen/WebAssembly/pr59626.ll @@ -13,16 +13,16 @@ ; CHECK-32-NEXT: i32.const 0 ; CHECK-32-NEXT: i32.store16 0 ; CHECK-32-NEXT: local.get 1 -; CHECK-32-NEXT: local.get 0 -; CHECK-32-NEXT: i8x16.splat -; CHECK-32-NEXT: v128.store16_lane 0, 0 -; CHECK-32-NEXT: v128.const 0, 0 -; CHECK-32-NEXT: i32x4.extract_lane 0 +; CHECK-32-NEXT: i32.const 5 +; CHECK-32-NEXT: i32.store8 2 +; CHECK-32-NEXT: local.get 1 +; CHECK-32-NEXT: i32.const 769 +; CHECK-32-NEXT: i32.store16 0 +; CHECK-32-NEXT: i32.const 1 ; CHECK-32-NEXT: # fallthrough-return ; ; CHECK-64-LABEL: f: ; CHECK-64: .functype f (i64, i64) -> (i32) -; CHECK-64-NEXT: .local i32 ; CHECK-64-NEXT: # %bb.0: # %BB ; CHECK-64-NEXT: local.get 0 ; CHECK-64-NEXT: i32.const 0 @@ -31,12 +31,12 @@ ; CHECK-64-NEXT: i32.const 0 ; CHECK-64-NEXT: i32.store16 0 ; CHECK-64-NEXT: local.get 1 -; CHECK-64-NEXT: local.get 2 -; CHECK-64-NEXT: i8x16.splat -; CHECK-64-NEXT: v128.store16_lane 0, 0 -; CHECK-64-NEXT: drop -; CHECK-64-NEXT: v128.const 0, 0 -; CHECK-64-NEXT: i32x4.extract_lane 0 +; CHECK-64-NEXT: i32.const 5 +; CHECK-64-NEXT: i32.store8 2 +; CHECK-64-NEXT: local.get 1 +; CHECK-64-NEXT: i32.const 769 +; CHECK-64-NEXT: i32.store16 0 +; CHECK-64-NEXT: i32.const 1 ; CHECK-64-NEXT: # fallthrough-return BB: store <3 x i8> zeroinitializer, ptr %0 Index: llvm/test/CodeGen/WebAssembly/reg-stackify.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/reg-stackify.ll +++ llvm/test/CodeGen/WebAssembly/reg-stackify.ll @@ -1,5 +1,5 @@ -; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -verify-machineinstrs | FileCheck %s -; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -verify-machineinstrs | FileCheck %s --check-prefix=NOREGS +; RUN: llc < %s -asm-verbose=false -start-after=licm -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -verify-machineinstrs | FileCheck %s +; RUN: llc < %s -asm-verbose=false -start-after=licm -disable-wasm-fallthrough-return-opt -verify-machineinstrs | FileCheck %s --check-prefix=NOREGS ; Test the register stackifier pass. Index: llvm/test/CodeGen/WebAssembly/return-int32.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/return-int32.ll +++ llvm/test/CodeGen/WebAssembly/return-int32.ll @@ -24,42 +24,36 @@ ; CHECK: .functype return_i32_twice (i32) -> (i32) ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: block -; CHECK-NEXT: local.get $push6=, 0 -; CHECK-NEXT: i32.eqz $push7=, $pop6 -; CHECK-NEXT: br_if 0, $pop7 # 0: down to label0 +; CHECK-NEXT: local.get $push2=, 0 +; CHECK-NEXT: i32.eqz $push3=, $pop2 +; CHECK-NEXT: br_if 0, $pop3 # 0: down to label0 ; CHECK-NEXT: # %bb.1: # %true -; CHECK-NEXT: i32.const $push3=, 0 -; CHECK-NEXT: i32.const $push5=, 0 -; CHECK-NEXT: i32.store 0($pop3), $pop5 -; CHECK-NEXT: i32.const $push4=, 1 -; CHECK-NEXT: return $pop4 +; CHECK-NEXT: i32.const $push0=, 1 +; CHECK-NEXT: return $pop0 ; CHECK-NEXT: .LBB1_2: # %false ; CHECK-NEXT: end_block # label0: -; CHECK-NEXT: i32.const $push1=, 0 -; CHECK-NEXT: i32.const $push0=, 2 -; CHECK-NEXT: i32.store 0($pop1), $pop0 -; CHECK-NEXT: i32.const $push2=, 3 +; CHECK-NEXT: i32.const $push1=, 3 ; CHECK-NEXT: # fallthrough-return ; ; FAST-LABEL: return_i32_twice: ; FAST: .functype return_i32_twice (i32) -> (i32) ; FAST-NEXT: # %bb.0: ; FAST-NEXT: block -; FAST-NEXT: local.get $push6=, 0 -; FAST-NEXT: i32.eqz $push7=, $pop6 +; FAST-NEXT: local.get $push4=, 0 +; FAST-NEXT: i32.eqz $push7=, $pop4 ; FAST-NEXT: br_if 0, $pop7 # 0: down to label0 ; FAST-NEXT: # %bb.1: # %true -; FAST-NEXT: i32.const $push4=, 0 -; FAST-NEXT: i32.const $push5=, 0 -; FAST-NEXT: i32.store 0($pop4), $pop5 -; FAST-NEXT: i32.const $push3=, 1 -; FAST-NEXT: return $pop3 +; FAST-NEXT: i32.const $push1=, 0 +; FAST-NEXT: local.get $push5=, 0 +; FAST-NEXT: i32.store 0($pop1), $pop5 +; FAST-NEXT: i32.const $push0=, 1 +; FAST-NEXT: return $pop0 ; FAST-NEXT: .LBB1_2: # %false ; FAST-NEXT: end_block # label0: -; FAST-NEXT: i32.const $push1=, 0 -; FAST-NEXT: i32.const $push2=, 2 -; FAST-NEXT: i32.store 0($pop1), $pop2 -; FAST-NEXT: i32.const $push0=, 3 +; FAST-NEXT: i32.const $push3=, 0 +; FAST-NEXT: local.get $push6=, 0 +; FAST-NEXT: i32.store 0($pop3), $pop6 +; FAST-NEXT: i32.const $push2=, 3 ; FAST-NEXT: # fallthrough-return %b = icmp ne i32 %a, 0 br i1 %b, label %true, label %false Index: llvm/test/CodeGen/WebAssembly/return-void.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/return-void.ll +++ llvm/test/CodeGen/WebAssembly/return-void.ll @@ -21,20 +21,6 @@ ; CHECK-LABEL: return_void_twice: ; CHECK: .functype return_void_twice (i32) -> () ; CHECK-NEXT: # %bb.0: -; CHECK-NEXT: block -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.eqz -; CHECK-NEXT: br_if 0 # 0: down to label0 -; CHECK-NEXT: # %bb.1: # %true -; CHECK-NEXT: i32.const 0 -; CHECK-NEXT: i32.const 0 -; CHECK-NEXT: i32.store 0 -; CHECK-NEXT: return -; CHECK-NEXT: .LBB1_2: # %false -; CHECK-NEXT: end_block # label0: -; CHECK-NEXT: i32.const 0 -; CHECK-NEXT: i32.const 1 -; CHECK-NEXT: i32.store 0 ; CHECK-NEXT: # fallthrough-return ; ; FAST-LABEL: return_void_twice: @@ -46,13 +32,13 @@ ; FAST-NEXT: br_if 0 # 0: down to label0 ; FAST-NEXT: # %bb.1: # %true ; FAST-NEXT: i32.const 0 -; FAST-NEXT: i32.const 0 +; FAST-NEXT: local.get 0 ; FAST-NEXT: i32.store 0 ; FAST-NEXT: return ; FAST-NEXT: .LBB1_2: # %false ; FAST-NEXT: end_block # label0: ; FAST-NEXT: i32.const 0 -; FAST-NEXT: i32.const 1 +; FAST-NEXT: local.get 0 ; FAST-NEXT: i32.store 0 ; FAST-NEXT: # fallthrough-return %b = icmp ne i32 %a, 0 Index: llvm/test/CodeGen/WebAssembly/returned.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/returned.ll +++ llvm/test/CodeGen/WebAssembly/returned.ll @@ -13,9 +13,10 @@ ; CHECK: .functype _Z3foov () -> (i32) ; CHECK-NEXT: # %bb.0: # %entry ; CHECK-NEXT: i32.const $push0=, 1 -; CHECK-NEXT: call $push1=, _Znwm, $pop0 -; CHECK-NEXT: call $push2=, _ZN5AppleC1Ev, $pop1 -; CHECK-NEXT: return $pop2 +; CHECK-NEXT: call $push2=, _Znwm, $pop0 +; CHECK-NEXT: local.tee $push1=, $0=, $pop2 +; CHECK-NEXT: call $drop=, _ZN5AppleC1Ev, $pop1 +; CHECK-NEXT: return $0 entry: %call = tail call noalias ptr @_Znwm(i32 1) %call1 = tail call ptr @_ZN5AppleC1Ev(ptr %call) @@ -75,8 +76,8 @@ ; CHECK-LABEL: test_second_arg: ; CHECK: .functype test_second_arg (i32, i32) -> (i32) ; CHECK-NEXT: # %bb.0: -; CHECK-NEXT: call $push0=, do_something_else, $0, $1 -; CHECK-NEXT: return $pop0 +; CHECK-NEXT: call $drop=, do_something_else, $0, $1 +; CHECK-NEXT: return $1 %call = call i32 @do_something_else(i32 %a, i32 %b) ret i32 %b } Index: llvm/test/CodeGen/WebAssembly/select.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/select.ll +++ llvm/test/CodeGen/WebAssembly/select.ll @@ -312,10 +312,10 @@ ; CHECK-LABEL: pr40805_i64: ; CHECK: .functype pr40805_i64 (i64, i64, i64) -> (i64) ; CHECK-NEXT: # %bb.0: -; CHECK-NEXT: i32.wrap_i64 $push0=, $0 -; CHECK-NEXT: i32.const $push1=, 1 -; CHECK-NEXT: i32.and $push2=, $pop0, $pop1 -; CHECK-NEXT: i64.select $push3=, $1, $2, $pop2 +; CHECK-NEXT: i64.const $push0=, 1 +; CHECK-NEXT: i64.and $push1=, $0, $pop0 +; CHECK-NEXT: i64.eqz $push2=, $pop1 +; CHECK-NEXT: i64.select $push3=, $2, $1, $pop2 ; CHECK-NEXT: return $pop3 ; ; FAST-LABEL: pr40805_i64: @@ -324,10 +324,10 @@ ; FAST-NEXT: i64.const $push5=, 1 ; FAST-NEXT: i64.and $push6=, $0, $pop5 ; FAST-NEXT: i64.const $push3=, 0 -; FAST-NEXT: i64.ne $push4=, $pop6, $pop3 +; FAST-NEXT: i64.eq $push4=, $pop6, $pop3 ; FAST-NEXT: i32.const $push0=, 1 ; FAST-NEXT: i32.and $push1=, $pop4, $pop0 -; FAST-NEXT: i64.select $push2=, $1, $2, $pop1 +; FAST-NEXT: i64.select $push2=, $2, $1, $pop1 ; FAST-NEXT: return $pop2 %a = and i64 %x, 1 %b = icmp ne i64 %a, 0 @@ -361,10 +361,10 @@ ; CHECK-LABEL: pr44012_i64: ; CHECK: .functype pr44012_i64 (i64, f32, f32) -> (f32) ; CHECK-NEXT: # %bb.0: -; CHECK-NEXT: i32.wrap_i64 $push0=, $0 -; CHECK-NEXT: i32.const $push1=, 1 -; CHECK-NEXT: i32.and $push2=, $pop0, $pop1 -; CHECK-NEXT: f32.select $push3=, $1, $2, $pop2 +; CHECK-NEXT: i64.const $push0=, 1 +; CHECK-NEXT: i64.and $push1=, $0, $pop0 +; CHECK-NEXT: i64.eqz $push2=, $pop1 +; CHECK-NEXT: f32.select $push3=, $2, $1, $pop2 ; CHECK-NEXT: return $pop3 ; ; FAST-LABEL: pr44012_i64: @@ -373,10 +373,10 @@ ; FAST-NEXT: i64.const $push5=, 1 ; FAST-NEXT: i64.and $push6=, $0, $pop5 ; FAST-NEXT: i64.const $push3=, 0 -; FAST-NEXT: i64.ne $push4=, $pop6, $pop3 +; FAST-NEXT: i64.eq $push4=, $pop6, $pop3 ; FAST-NEXT: i32.const $push0=, 1 ; FAST-NEXT: i32.and $push1=, $pop4, $pop0 -; FAST-NEXT: f32.select $push2=, $1, $2, $pop1 +; FAST-NEXT: f32.select $push2=, $2, $1, $pop1 ; FAST-NEXT: return $pop2 %a = and i64 %x, 1 %b = icmp ne i64 %a, 0 Index: llvm/test/CodeGen/WebAssembly/simd-arith.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/simd-arith.ll +++ llvm/test/CodeGen/WebAssembly/simd-arith.ll @@ -559,215 +559,279 @@ ; NO-SIMD128-LABEL: min_s_v16i8: ; NO-SIMD128: .functype min_s_v16i8 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> () ; NO-SIMD128-NEXT: # %bb.0: -; NO-SIMD128-NEXT: i32.const $push4=, 15 -; NO-SIMD128-NEXT: i32.add $push5=, $0, $pop4 -; NO-SIMD128-NEXT: i32.extend8_s $push1=, $16 -; NO-SIMD128-NEXT: i32.extend8_s $push0=, $32 -; NO-SIMD128-NEXT: i32.lt_s $push2=, $pop1, $pop0 -; NO-SIMD128-NEXT: i32.select $push3=, $16, $32, $pop2 -; NO-SIMD128-NEXT: i32.store8 0($pop5), $pop3 -; NO-SIMD128-NEXT: i32.const $push10=, 14 +; NO-SIMD128-NEXT: i32.const $push2=, 15 +; NO-SIMD128-NEXT: i32.add $push3=, $0, $pop2 +; NO-SIMD128-NEXT: i32.extend8_s $push117=, $16 +; NO-SIMD128-NEXT: local.tee $push116=, $16=, $pop117 +; NO-SIMD128-NEXT: i32.extend8_s $push115=, $32 +; NO-SIMD128-NEXT: local.tee $push114=, $32=, $pop115 +; NO-SIMD128-NEXT: i32.lt_s $push0=, $16, $32 +; NO-SIMD128-NEXT: i32.select $push1=, $pop116, $pop114, $pop0 +; NO-SIMD128-NEXT: i32.store8 0($pop3), $pop1 +; NO-SIMD128-NEXT: i32.const $push6=, 14 +; NO-SIMD128-NEXT: i32.add $push7=, $0, $pop6 +; NO-SIMD128-NEXT: i32.extend8_s $push113=, $15 +; NO-SIMD128-NEXT: local.tee $push112=, $32=, $pop113 +; NO-SIMD128-NEXT: i32.extend8_s $push111=, $31 +; NO-SIMD128-NEXT: local.tee $push110=, $16=, $pop111 +; NO-SIMD128-NEXT: i32.lt_s $push4=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push5=, $pop112, $pop110, $pop4 +; NO-SIMD128-NEXT: i32.store8 0($pop7), $pop5 +; NO-SIMD128-NEXT: i32.const $push10=, 13 ; NO-SIMD128-NEXT: i32.add $push11=, $0, $pop10 -; NO-SIMD128-NEXT: i32.extend8_s $push7=, $15 -; NO-SIMD128-NEXT: i32.extend8_s $push6=, $31 -; NO-SIMD128-NEXT: i32.lt_s $push8=, $pop7, $pop6 -; NO-SIMD128-NEXT: i32.select $push9=, $15, $31, $pop8 +; NO-SIMD128-NEXT: i32.extend8_s $push109=, $14 +; NO-SIMD128-NEXT: local.tee $push108=, $32=, $pop109 +; NO-SIMD128-NEXT: i32.extend8_s $push107=, $30 +; NO-SIMD128-NEXT: local.tee $push106=, $16=, $pop107 +; NO-SIMD128-NEXT: i32.lt_s $push8=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push9=, $pop108, $pop106, $pop8 ; NO-SIMD128-NEXT: i32.store8 0($pop11), $pop9 -; NO-SIMD128-NEXT: i32.const $push16=, 13 -; NO-SIMD128-NEXT: i32.add $push17=, $0, $pop16 -; NO-SIMD128-NEXT: i32.extend8_s $push13=, $14 -; NO-SIMD128-NEXT: i32.extend8_s $push12=, $30 -; NO-SIMD128-NEXT: i32.lt_s $push14=, $pop13, $pop12 -; NO-SIMD128-NEXT: i32.select $push15=, $14, $30, $pop14 -; NO-SIMD128-NEXT: i32.store8 0($pop17), $pop15 -; NO-SIMD128-NEXT: i32.const $push22=, 12 +; NO-SIMD128-NEXT: i32.const $push14=, 12 +; NO-SIMD128-NEXT: i32.add $push15=, $0, $pop14 +; NO-SIMD128-NEXT: i32.extend8_s $push105=, $13 +; NO-SIMD128-NEXT: local.tee $push104=, $32=, $pop105 +; NO-SIMD128-NEXT: i32.extend8_s $push103=, $29 +; NO-SIMD128-NEXT: local.tee $push102=, $16=, $pop103 +; NO-SIMD128-NEXT: i32.lt_s $push12=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push13=, $pop104, $pop102, $pop12 +; NO-SIMD128-NEXT: i32.store8 0($pop15), $pop13 +; NO-SIMD128-NEXT: i32.const $push18=, 11 +; NO-SIMD128-NEXT: i32.add $push19=, $0, $pop18 +; NO-SIMD128-NEXT: i32.extend8_s $push101=, $12 +; NO-SIMD128-NEXT: local.tee $push100=, $32=, $pop101 +; NO-SIMD128-NEXT: i32.extend8_s $push99=, $28 +; NO-SIMD128-NEXT: local.tee $push98=, $16=, $pop99 +; NO-SIMD128-NEXT: i32.lt_s $push16=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push17=, $pop100, $pop98, $pop16 +; NO-SIMD128-NEXT: i32.store8 0($pop19), $pop17 +; NO-SIMD128-NEXT: i32.const $push22=, 10 ; NO-SIMD128-NEXT: i32.add $push23=, $0, $pop22 -; NO-SIMD128-NEXT: i32.extend8_s $push19=, $13 -; NO-SIMD128-NEXT: i32.extend8_s $push18=, $29 -; NO-SIMD128-NEXT: i32.lt_s $push20=, $pop19, $pop18 -; NO-SIMD128-NEXT: i32.select $push21=, $13, $29, $pop20 +; NO-SIMD128-NEXT: i32.extend8_s $push97=, $11 +; NO-SIMD128-NEXT: local.tee $push96=, $32=, $pop97 +; NO-SIMD128-NEXT: i32.extend8_s $push95=, $27 +; NO-SIMD128-NEXT: local.tee $push94=, $16=, $pop95 +; NO-SIMD128-NEXT: i32.lt_s $push20=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push21=, $pop96, $pop94, $pop20 ; NO-SIMD128-NEXT: i32.store8 0($pop23), $pop21 -; NO-SIMD128-NEXT: i32.const $push28=, 11 -; NO-SIMD128-NEXT: i32.add $push29=, $0, $pop28 -; NO-SIMD128-NEXT: i32.extend8_s $push25=, $12 -; NO-SIMD128-NEXT: i32.extend8_s $push24=, $28 -; NO-SIMD128-NEXT: i32.lt_s $push26=, $pop25, $pop24 -; NO-SIMD128-NEXT: i32.select $push27=, $12, $28, $pop26 -; NO-SIMD128-NEXT: i32.store8 0($pop29), $pop27 -; NO-SIMD128-NEXT: i32.const $push34=, 10 -; NO-SIMD128-NEXT: i32.add $push35=, $0, $pop34 -; NO-SIMD128-NEXT: i32.extend8_s $push31=, $11 -; NO-SIMD128-NEXT: i32.extend8_s $push30=, $27 -; NO-SIMD128-NEXT: i32.lt_s $push32=, $pop31, $pop30 -; NO-SIMD128-NEXT: i32.select $push33=, $11, $27, $pop32 -; NO-SIMD128-NEXT: i32.store8 0($pop35), $pop33 -; NO-SIMD128-NEXT: i32.const $push40=, 9 +; NO-SIMD128-NEXT: i32.const $push26=, 9 +; NO-SIMD128-NEXT: i32.add $push27=, $0, $pop26 +; NO-SIMD128-NEXT: i32.extend8_s $push93=, $10 +; NO-SIMD128-NEXT: local.tee $push92=, $32=, $pop93 +; NO-SIMD128-NEXT: i32.extend8_s $push91=, $26 +; NO-SIMD128-NEXT: local.tee $push90=, $16=, $pop91 +; NO-SIMD128-NEXT: i32.lt_s $push24=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push25=, $pop92, $pop90, $pop24 +; NO-SIMD128-NEXT: i32.store8 0($pop27), $pop25 +; NO-SIMD128-NEXT: i32.extend8_s $push89=, $9 +; NO-SIMD128-NEXT: local.tee $push88=, $32=, $pop89 +; NO-SIMD128-NEXT: i32.extend8_s $push87=, $25 +; NO-SIMD128-NEXT: local.tee $push86=, $16=, $pop87 +; NO-SIMD128-NEXT: i32.lt_s $push28=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push29=, $pop88, $pop86, $pop28 +; NO-SIMD128-NEXT: i32.store8 8($0), $pop29 +; NO-SIMD128-NEXT: i32.const $push32=, 7 +; NO-SIMD128-NEXT: i32.add $push33=, $0, $pop32 +; NO-SIMD128-NEXT: i32.extend8_s $push85=, $8 +; NO-SIMD128-NEXT: local.tee $push84=, $32=, $pop85 +; NO-SIMD128-NEXT: i32.extend8_s $push83=, $24 +; NO-SIMD128-NEXT: local.tee $push82=, $16=, $pop83 +; NO-SIMD128-NEXT: i32.lt_s $push30=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push31=, $pop84, $pop82, $pop30 +; NO-SIMD128-NEXT: i32.store8 0($pop33), $pop31 +; NO-SIMD128-NEXT: i32.const $push36=, 6 +; NO-SIMD128-NEXT: i32.add $push37=, $0, $pop36 +; NO-SIMD128-NEXT: i32.extend8_s $push81=, $7 +; NO-SIMD128-NEXT: local.tee $push80=, $32=, $pop81 +; NO-SIMD128-NEXT: i32.extend8_s $push79=, $23 +; NO-SIMD128-NEXT: local.tee $push78=, $16=, $pop79 +; NO-SIMD128-NEXT: i32.lt_s $push34=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push35=, $pop80, $pop78, $pop34 +; NO-SIMD128-NEXT: i32.store8 0($pop37), $pop35 +; NO-SIMD128-NEXT: i32.const $push40=, 5 ; NO-SIMD128-NEXT: i32.add $push41=, $0, $pop40 -; NO-SIMD128-NEXT: i32.extend8_s $push37=, $10 -; NO-SIMD128-NEXT: i32.extend8_s $push36=, $26 -; NO-SIMD128-NEXT: i32.lt_s $push38=, $pop37, $pop36 -; NO-SIMD128-NEXT: i32.select $push39=, $10, $26, $pop38 +; NO-SIMD128-NEXT: i32.extend8_s $push77=, $6 +; NO-SIMD128-NEXT: local.tee $push76=, $32=, $pop77 +; NO-SIMD128-NEXT: i32.extend8_s $push75=, $22 +; NO-SIMD128-NEXT: local.tee $push74=, $16=, $pop75 +; NO-SIMD128-NEXT: i32.lt_s $push38=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push39=, $pop76, $pop74, $pop38 ; NO-SIMD128-NEXT: i32.store8 0($pop41), $pop39 -; NO-SIMD128-NEXT: i32.extend8_s $push43=, $9 -; NO-SIMD128-NEXT: i32.extend8_s $push42=, $25 -; NO-SIMD128-NEXT: i32.lt_s $push44=, $pop43, $pop42 -; NO-SIMD128-NEXT: i32.select $push45=, $9, $25, $pop44 -; NO-SIMD128-NEXT: i32.store8 8($0), $pop45 -; NO-SIMD128-NEXT: i32.const $push50=, 7 -; NO-SIMD128-NEXT: i32.add $push51=, $0, $pop50 -; NO-SIMD128-NEXT: i32.extend8_s $push47=, $8 -; NO-SIMD128-NEXT: i32.extend8_s $push46=, $24 -; NO-SIMD128-NEXT: i32.lt_s $push48=, $pop47, $pop46 -; NO-SIMD128-NEXT: i32.select $push49=, $8, $24, $pop48 -; NO-SIMD128-NEXT: i32.store8 0($pop51), $pop49 -; NO-SIMD128-NEXT: i32.const $push56=, 6 -; NO-SIMD128-NEXT: i32.add $push57=, $0, $pop56 -; NO-SIMD128-NEXT: i32.extend8_s $push53=, $7 -; NO-SIMD128-NEXT: i32.extend8_s $push52=, $23 -; NO-SIMD128-NEXT: i32.lt_s $push54=, $pop53, $pop52 -; NO-SIMD128-NEXT: i32.select $push55=, $7, $23, $pop54 -; NO-SIMD128-NEXT: i32.store8 0($pop57), $pop55 -; NO-SIMD128-NEXT: i32.const $push62=, 5 -; NO-SIMD128-NEXT: i32.add $push63=, $0, $pop62 -; NO-SIMD128-NEXT: i32.extend8_s $push59=, $6 -; NO-SIMD128-NEXT: i32.extend8_s $push58=, $22 -; NO-SIMD128-NEXT: i32.lt_s $push60=, $pop59, $pop58 -; NO-SIMD128-NEXT: i32.select $push61=, $6, $22, $pop60 -; NO-SIMD128-NEXT: i32.store8 0($pop63), $pop61 -; NO-SIMD128-NEXT: i32.extend8_s $push65=, $5 -; NO-SIMD128-NEXT: i32.extend8_s $push64=, $21 -; NO-SIMD128-NEXT: i32.lt_s $push66=, $pop65, $pop64 -; NO-SIMD128-NEXT: i32.select $push67=, $5, $21, $pop66 -; NO-SIMD128-NEXT: i32.store8 4($0), $pop67 -; NO-SIMD128-NEXT: i32.const $push72=, 3 -; NO-SIMD128-NEXT: i32.add $push73=, $0, $pop72 +; NO-SIMD128-NEXT: i32.extend8_s $push73=, $5 +; NO-SIMD128-NEXT: local.tee $push72=, $32=, $pop73 +; NO-SIMD128-NEXT: i32.extend8_s $push71=, $21 +; NO-SIMD128-NEXT: local.tee $push70=, $16=, $pop71 +; NO-SIMD128-NEXT: i32.lt_s $push42=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push43=, $pop72, $pop70, $pop42 +; NO-SIMD128-NEXT: i32.store8 4($0), $pop43 +; NO-SIMD128-NEXT: i32.const $push46=, 3 +; NO-SIMD128-NEXT: i32.add $push47=, $0, $pop46 ; NO-SIMD128-NEXT: i32.extend8_s $push69=, $4 -; NO-SIMD128-NEXT: i32.extend8_s $push68=, $20 -; NO-SIMD128-NEXT: i32.lt_s $push70=, $pop69, $pop68 -; NO-SIMD128-NEXT: i32.select $push71=, $4, $20, $pop70 -; NO-SIMD128-NEXT: i32.store8 0($pop73), $pop71 -; NO-SIMD128-NEXT: i32.extend8_s $push75=, $3 -; NO-SIMD128-NEXT: i32.extend8_s $push74=, $19 -; NO-SIMD128-NEXT: i32.lt_s $push76=, $pop75, $pop74 -; NO-SIMD128-NEXT: i32.select $push77=, $3, $19, $pop76 -; NO-SIMD128-NEXT: i32.store8 2($0), $pop77 -; NO-SIMD128-NEXT: i32.extend8_s $push79=, $2 -; NO-SIMD128-NEXT: i32.extend8_s $push78=, $18 -; NO-SIMD128-NEXT: i32.lt_s $push80=, $pop79, $pop78 -; NO-SIMD128-NEXT: i32.select $push81=, $2, $18, $pop80 -; NO-SIMD128-NEXT: i32.store8 1($0), $pop81 -; NO-SIMD128-NEXT: i32.extend8_s $push83=, $1 -; NO-SIMD128-NEXT: i32.extend8_s $push82=, $17 -; NO-SIMD128-NEXT: i32.lt_s $push84=, $pop83, $pop82 -; NO-SIMD128-NEXT: i32.select $push85=, $1, $17, $pop84 -; NO-SIMD128-NEXT: i32.store8 0($0), $pop85 +; NO-SIMD128-NEXT: local.tee $push68=, $32=, $pop69 +; NO-SIMD128-NEXT: i32.extend8_s $push67=, $20 +; NO-SIMD128-NEXT: local.tee $push66=, $16=, $pop67 +; NO-SIMD128-NEXT: i32.lt_s $push44=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push45=, $pop68, $pop66, $pop44 +; NO-SIMD128-NEXT: i32.store8 0($pop47), $pop45 +; NO-SIMD128-NEXT: i32.extend8_s $push65=, $3 +; NO-SIMD128-NEXT: local.tee $push64=, $32=, $pop65 +; NO-SIMD128-NEXT: i32.extend8_s $push63=, $19 +; NO-SIMD128-NEXT: local.tee $push62=, $16=, $pop63 +; NO-SIMD128-NEXT: i32.lt_s $push48=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push49=, $pop64, $pop62, $pop48 +; NO-SIMD128-NEXT: i32.store8 2($0), $pop49 +; NO-SIMD128-NEXT: i32.extend8_s $push61=, $2 +; NO-SIMD128-NEXT: local.tee $push60=, $32=, $pop61 +; NO-SIMD128-NEXT: i32.extend8_s $push59=, $18 +; NO-SIMD128-NEXT: local.tee $push58=, $16=, $pop59 +; NO-SIMD128-NEXT: i32.lt_s $push50=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push51=, $pop60, $pop58, $pop50 +; NO-SIMD128-NEXT: i32.store8 1($0), $pop51 +; NO-SIMD128-NEXT: i32.extend8_s $push57=, $1 +; NO-SIMD128-NEXT: local.tee $push56=, $32=, $pop57 +; NO-SIMD128-NEXT: i32.extend8_s $push55=, $17 +; NO-SIMD128-NEXT: local.tee $push54=, $16=, $pop55 +; NO-SIMD128-NEXT: i32.lt_s $push52=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push53=, $pop56, $pop54, $pop52 +; NO-SIMD128-NEXT: i32.store8 0($0), $pop53 ; NO-SIMD128-NEXT: return ; ; NO-SIMD128-FAST-LABEL: min_s_v16i8: ; NO-SIMD128-FAST: .functype min_s_v16i8 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> () ; NO-SIMD128-FAST-NEXT: # %bb.0: -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push1=, $1 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push0=, $17 -; NO-SIMD128-FAST-NEXT: i32.lt_s $push2=, $pop1, $pop0 -; NO-SIMD128-FAST-NEXT: i32.select $push3=, $1, $17, $pop2 -; NO-SIMD128-FAST-NEXT: i32.store8 0($0), $pop3 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push5=, $2 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push4=, $18 -; NO-SIMD128-FAST-NEXT: i32.lt_s $push6=, $pop5, $pop4 -; NO-SIMD128-FAST-NEXT: i32.select $push7=, $2, $18, $pop6 -; NO-SIMD128-FAST-NEXT: i32.store8 1($0), $pop7 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push9=, $3 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push8=, $19 -; NO-SIMD128-FAST-NEXT: i32.lt_s $push10=, $pop9, $pop8 -; NO-SIMD128-FAST-NEXT: i32.select $push11=, $3, $19, $pop10 -; NO-SIMD128-FAST-NEXT: i32.store8 2($0), $pop11 -; NO-SIMD128-FAST-NEXT: i32.const $push16=, 3 -; NO-SIMD128-FAST-NEXT: i32.add $push17=, $0, $pop16 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push13=, $4 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push12=, $20 -; NO-SIMD128-FAST-NEXT: i32.lt_s $push14=, $pop13, $pop12 -; NO-SIMD128-FAST-NEXT: i32.select $push15=, $4, $20, $pop14 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop17), $pop15 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push19=, $5 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push18=, $21 -; NO-SIMD128-FAST-NEXT: i32.lt_s $push20=, $pop19, $pop18 -; NO-SIMD128-FAST-NEXT: i32.select $push21=, $5, $21, $pop20 -; NO-SIMD128-FAST-NEXT: i32.store8 4($0), $pop21 -; NO-SIMD128-FAST-NEXT: i32.const $push26=, 5 -; NO-SIMD128-FAST-NEXT: i32.add $push27=, $0, $pop26 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push23=, $6 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push22=, $22 -; NO-SIMD128-FAST-NEXT: i32.lt_s $push24=, $pop23, $pop22 -; NO-SIMD128-FAST-NEXT: i32.select $push25=, $6, $22, $pop24 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop27), $pop25 -; NO-SIMD128-FAST-NEXT: i32.const $push32=, 6 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push117=, $1 +; NO-SIMD128-FAST-NEXT: local.tee $push116=, $1=, $pop117 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push115=, $17 +; NO-SIMD128-FAST-NEXT: local.tee $push114=, $17=, $pop115 +; NO-SIMD128-FAST-NEXT: i32.lt_s $push0=, $1, $17 +; NO-SIMD128-FAST-NEXT: i32.select $push1=, $pop116, $pop114, $pop0 +; NO-SIMD128-FAST-NEXT: i32.store8 0($0), $pop1 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push113=, $2 +; NO-SIMD128-FAST-NEXT: local.tee $push112=, $17=, $pop113 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push111=, $18 +; NO-SIMD128-FAST-NEXT: local.tee $push110=, $18=, $pop111 +; NO-SIMD128-FAST-NEXT: i32.lt_s $push2=, $17, $18 +; NO-SIMD128-FAST-NEXT: i32.select $push3=, $pop112, $pop110, $pop2 +; NO-SIMD128-FAST-NEXT: i32.store8 1($0), $pop3 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push109=, $3 +; NO-SIMD128-FAST-NEXT: local.tee $push108=, $18=, $pop109 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push107=, $19 +; NO-SIMD128-FAST-NEXT: local.tee $push106=, $19=, $pop107 +; NO-SIMD128-FAST-NEXT: i32.lt_s $push4=, $18, $19 +; NO-SIMD128-FAST-NEXT: i32.select $push5=, $pop108, $pop106, $pop4 +; NO-SIMD128-FAST-NEXT: i32.store8 2($0), $pop5 +; NO-SIMD128-FAST-NEXT: i32.const $push8=, 3 +; NO-SIMD128-FAST-NEXT: i32.add $push9=, $0, $pop8 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push105=, $4 +; NO-SIMD128-FAST-NEXT: local.tee $push104=, $19=, $pop105 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push103=, $20 +; NO-SIMD128-FAST-NEXT: local.tee $push102=, $20=, $pop103 +; NO-SIMD128-FAST-NEXT: i32.lt_s $push6=, $19, $20 +; NO-SIMD128-FAST-NEXT: i32.select $push7=, $pop104, $pop102, $pop6 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop9), $pop7 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push101=, $5 +; NO-SIMD128-FAST-NEXT: local.tee $push100=, $20=, $pop101 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push99=, $21 +; NO-SIMD128-FAST-NEXT: local.tee $push98=, $21=, $pop99 +; NO-SIMD128-FAST-NEXT: i32.lt_s $push10=, $20, $21 +; NO-SIMD128-FAST-NEXT: i32.select $push11=, $pop100, $pop98, $pop10 +; NO-SIMD128-FAST-NEXT: i32.store8 4($0), $pop11 +; NO-SIMD128-FAST-NEXT: i32.const $push14=, 5 +; NO-SIMD128-FAST-NEXT: i32.add $push15=, $0, $pop14 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push97=, $6 +; NO-SIMD128-FAST-NEXT: local.tee $push96=, $21=, $pop97 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push95=, $22 +; NO-SIMD128-FAST-NEXT: local.tee $push94=, $22=, $pop95 +; NO-SIMD128-FAST-NEXT: i32.lt_s $push12=, $21, $22 +; NO-SIMD128-FAST-NEXT: i32.select $push13=, $pop96, $pop94, $pop12 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop15), $pop13 +; NO-SIMD128-FAST-NEXT: i32.const $push18=, 6 +; NO-SIMD128-FAST-NEXT: i32.add $push19=, $0, $pop18 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push93=, $7 +; NO-SIMD128-FAST-NEXT: local.tee $push92=, $22=, $pop93 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push91=, $23 +; NO-SIMD128-FAST-NEXT: local.tee $push90=, $23=, $pop91 +; NO-SIMD128-FAST-NEXT: i32.lt_s $push16=, $22, $23 +; NO-SIMD128-FAST-NEXT: i32.select $push17=, $pop92, $pop90, $pop16 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop19), $pop17 +; NO-SIMD128-FAST-NEXT: i32.const $push22=, 7 +; NO-SIMD128-FAST-NEXT: i32.add $push23=, $0, $pop22 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push89=, $8 +; NO-SIMD128-FAST-NEXT: local.tee $push88=, $23=, $pop89 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push87=, $24 +; NO-SIMD128-FAST-NEXT: local.tee $push86=, $24=, $pop87 +; NO-SIMD128-FAST-NEXT: i32.lt_s $push20=, $23, $24 +; NO-SIMD128-FAST-NEXT: i32.select $push21=, $pop88, $pop86, $pop20 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop23), $pop21 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push85=, $9 +; NO-SIMD128-FAST-NEXT: local.tee $push84=, $24=, $pop85 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push83=, $25 +; NO-SIMD128-FAST-NEXT: local.tee $push82=, $25=, $pop83 +; NO-SIMD128-FAST-NEXT: i32.lt_s $push24=, $24, $25 +; NO-SIMD128-FAST-NEXT: i32.select $push25=, $pop84, $pop82, $pop24 +; NO-SIMD128-FAST-NEXT: i32.store8 8($0), $pop25 +; NO-SIMD128-FAST-NEXT: i32.const $push28=, 9 +; NO-SIMD128-FAST-NEXT: i32.add $push29=, $0, $pop28 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push81=, $10 +; NO-SIMD128-FAST-NEXT: local.tee $push80=, $25=, $pop81 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push79=, $26 +; NO-SIMD128-FAST-NEXT: local.tee $push78=, $26=, $pop79 +; NO-SIMD128-FAST-NEXT: i32.lt_s $push26=, $25, $26 +; NO-SIMD128-FAST-NEXT: i32.select $push27=, $pop80, $pop78, $pop26 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop29), $pop27 +; NO-SIMD128-FAST-NEXT: i32.const $push32=, 10 ; NO-SIMD128-FAST-NEXT: i32.add $push33=, $0, $pop32 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push29=, $7 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push28=, $23 -; NO-SIMD128-FAST-NEXT: i32.lt_s $push30=, $pop29, $pop28 -; NO-SIMD128-FAST-NEXT: i32.select $push31=, $7, $23, $pop30 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push77=, $11 +; NO-SIMD128-FAST-NEXT: local.tee $push76=, $26=, $pop77 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push75=, $27 +; NO-SIMD128-FAST-NEXT: local.tee $push74=, $27=, $pop75 +; NO-SIMD128-FAST-NEXT: i32.lt_s $push30=, $26, $27 +; NO-SIMD128-FAST-NEXT: i32.select $push31=, $pop76, $pop74, $pop30 ; NO-SIMD128-FAST-NEXT: i32.store8 0($pop33), $pop31 -; NO-SIMD128-FAST-NEXT: i32.const $push38=, 7 -; NO-SIMD128-FAST-NEXT: i32.add $push39=, $0, $pop38 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push35=, $8 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push34=, $24 -; NO-SIMD128-FAST-NEXT: i32.lt_s $push36=, $pop35, $pop34 -; NO-SIMD128-FAST-NEXT: i32.select $push37=, $8, $24, $pop36 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop39), $pop37 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push41=, $9 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push40=, $25 -; NO-SIMD128-FAST-NEXT: i32.lt_s $push42=, $pop41, $pop40 -; NO-SIMD128-FAST-NEXT: i32.select $push43=, $9, $25, $pop42 -; NO-SIMD128-FAST-NEXT: i32.store8 8($0), $pop43 -; NO-SIMD128-FAST-NEXT: i32.const $push48=, 9 +; NO-SIMD128-FAST-NEXT: i32.const $push36=, 11 +; NO-SIMD128-FAST-NEXT: i32.add $push37=, $0, $pop36 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push73=, $12 +; NO-SIMD128-FAST-NEXT: local.tee $push72=, $27=, $pop73 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push71=, $28 +; NO-SIMD128-FAST-NEXT: local.tee $push70=, $28=, $pop71 +; NO-SIMD128-FAST-NEXT: i32.lt_s $push34=, $27, $28 +; NO-SIMD128-FAST-NEXT: i32.select $push35=, $pop72, $pop70, $pop34 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop37), $pop35 +; NO-SIMD128-FAST-NEXT: i32.const $push40=, 12 +; NO-SIMD128-FAST-NEXT: i32.add $push41=, $0, $pop40 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push69=, $13 +; NO-SIMD128-FAST-NEXT: local.tee $push68=, $28=, $pop69 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push67=, $29 +; NO-SIMD128-FAST-NEXT: local.tee $push66=, $29=, $pop67 +; NO-SIMD128-FAST-NEXT: i32.lt_s $push38=, $28, $29 +; NO-SIMD128-FAST-NEXT: i32.select $push39=, $pop68, $pop66, $pop38 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop41), $pop39 +; NO-SIMD128-FAST-NEXT: i32.const $push44=, 13 +; NO-SIMD128-FAST-NEXT: i32.add $push45=, $0, $pop44 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push65=, $14 +; NO-SIMD128-FAST-NEXT: local.tee $push64=, $29=, $pop65 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push63=, $30 +; NO-SIMD128-FAST-NEXT: local.tee $push62=, $30=, $pop63 +; NO-SIMD128-FAST-NEXT: i32.lt_s $push42=, $29, $30 +; NO-SIMD128-FAST-NEXT: i32.select $push43=, $pop64, $pop62, $pop42 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop45), $pop43 +; NO-SIMD128-FAST-NEXT: i32.const $push48=, 14 ; NO-SIMD128-FAST-NEXT: i32.add $push49=, $0, $pop48 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push45=, $10 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push44=, $26 -; NO-SIMD128-FAST-NEXT: i32.lt_s $push46=, $pop45, $pop44 -; NO-SIMD128-FAST-NEXT: i32.select $push47=, $10, $26, $pop46 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push61=, $15 +; NO-SIMD128-FAST-NEXT: local.tee $push60=, $30=, $pop61 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push59=, $31 +; NO-SIMD128-FAST-NEXT: local.tee $push58=, $31=, $pop59 +; NO-SIMD128-FAST-NEXT: i32.lt_s $push46=, $30, $31 +; NO-SIMD128-FAST-NEXT: i32.select $push47=, $pop60, $pop58, $pop46 ; NO-SIMD128-FAST-NEXT: i32.store8 0($pop49), $pop47 -; NO-SIMD128-FAST-NEXT: i32.const $push54=, 10 -; NO-SIMD128-FAST-NEXT: i32.add $push55=, $0, $pop54 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push51=, $11 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push50=, $27 -; NO-SIMD128-FAST-NEXT: i32.lt_s $push52=, $pop51, $pop50 -; NO-SIMD128-FAST-NEXT: i32.select $push53=, $11, $27, $pop52 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop55), $pop53 -; NO-SIMD128-FAST-NEXT: i32.const $push60=, 11 -; NO-SIMD128-FAST-NEXT: i32.add $push61=, $0, $pop60 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push57=, $12 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push56=, $28 -; NO-SIMD128-FAST-NEXT: i32.lt_s $push58=, $pop57, $pop56 -; NO-SIMD128-FAST-NEXT: i32.select $push59=, $12, $28, $pop58 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop61), $pop59 -; NO-SIMD128-FAST-NEXT: i32.const $push66=, 12 -; NO-SIMD128-FAST-NEXT: i32.add $push67=, $0, $pop66 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push63=, $13 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push62=, $29 -; NO-SIMD128-FAST-NEXT: i32.lt_s $push64=, $pop63, $pop62 -; NO-SIMD128-FAST-NEXT: i32.select $push65=, $13, $29, $pop64 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop67), $pop65 -; NO-SIMD128-FAST-NEXT: i32.const $push72=, 13 -; NO-SIMD128-FAST-NEXT: i32.add $push73=, $0, $pop72 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push69=, $14 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push68=, $30 -; NO-SIMD128-FAST-NEXT: i32.lt_s $push70=, $pop69, $pop68 -; NO-SIMD128-FAST-NEXT: i32.select $push71=, $14, $30, $pop70 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop73), $pop71 -; NO-SIMD128-FAST-NEXT: i32.const $push78=, 14 -; NO-SIMD128-FAST-NEXT: i32.add $push79=, $0, $pop78 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push75=, $15 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push74=, $31 -; NO-SIMD128-FAST-NEXT: i32.lt_s $push76=, $pop75, $pop74 -; NO-SIMD128-FAST-NEXT: i32.select $push77=, $15, $31, $pop76 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop79), $pop77 -; NO-SIMD128-FAST-NEXT: i32.const $push84=, 15 -; NO-SIMD128-FAST-NEXT: i32.add $push85=, $0, $pop84 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push81=, $16 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push80=, $32 -; NO-SIMD128-FAST-NEXT: i32.lt_s $push82=, $pop81, $pop80 -; NO-SIMD128-FAST-NEXT: i32.select $push83=, $16, $32, $pop82 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop85), $pop83 +; NO-SIMD128-FAST-NEXT: i32.const $push52=, 15 +; NO-SIMD128-FAST-NEXT: i32.add $push53=, $0, $pop52 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push57=, $16 +; NO-SIMD128-FAST-NEXT: local.tee $push56=, $0=, $pop57 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push55=, $32 +; NO-SIMD128-FAST-NEXT: local.tee $push54=, $32=, $pop55 +; NO-SIMD128-FAST-NEXT: i32.lt_s $push50=, $0, $32 +; NO-SIMD128-FAST-NEXT: i32.select $push51=, $pop56, $pop54, $pop50 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop53), $pop51 ; NO-SIMD128-FAST-NEXT: return %c = icmp slt <16 x i8> %x, %y %a = select <16 x i1> %c, <16 x i8> %x, <16 x i8> %y @@ -790,279 +854,343 @@ ; NO-SIMD128-LABEL: min_u_v16i8: ; NO-SIMD128: .functype min_u_v16i8 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> () ; NO-SIMD128-NEXT: # %bb.0: -; NO-SIMD128-NEXT: i32.const $push5=, 15 -; NO-SIMD128-NEXT: i32.add $push6=, $0, $pop5 +; NO-SIMD128-NEXT: i32.const $push3=, 15 +; NO-SIMD128-NEXT: i32.add $push4=, $0, $pop3 ; NO-SIMD128-NEXT: i32.const $push0=, 255 -; NO-SIMD128-NEXT: i32.and $push2=, $16, $pop0 -; NO-SIMD128-NEXT: i32.const $push117=, 255 -; NO-SIMD128-NEXT: i32.and $push1=, $32, $pop117 -; NO-SIMD128-NEXT: i32.lt_u $push3=, $pop2, $pop1 -; NO-SIMD128-NEXT: i32.select $push4=, $16, $32, $pop3 -; NO-SIMD128-NEXT: i32.store8 0($pop6), $pop4 -; NO-SIMD128-NEXT: i32.const $push11=, 14 +; NO-SIMD128-NEXT: i32.and $push149=, $16, $pop0 +; NO-SIMD128-NEXT: local.tee $push148=, $16=, $pop149 +; NO-SIMD128-NEXT: i32.const $push147=, 255 +; NO-SIMD128-NEXT: i32.and $push146=, $32, $pop147 +; NO-SIMD128-NEXT: local.tee $push145=, $32=, $pop146 +; NO-SIMD128-NEXT: i32.lt_u $push1=, $16, $32 +; NO-SIMD128-NEXT: i32.select $push2=, $pop148, $pop145, $pop1 +; NO-SIMD128-NEXT: i32.store8 0($pop4), $pop2 +; NO-SIMD128-NEXT: i32.const $push7=, 14 +; NO-SIMD128-NEXT: i32.add $push8=, $0, $pop7 +; NO-SIMD128-NEXT: i32.const $push144=, 255 +; NO-SIMD128-NEXT: i32.and $push143=, $15, $pop144 +; NO-SIMD128-NEXT: local.tee $push142=, $32=, $pop143 +; NO-SIMD128-NEXT: i32.const $push141=, 255 +; NO-SIMD128-NEXT: i32.and $push140=, $31, $pop141 +; NO-SIMD128-NEXT: local.tee $push139=, $16=, $pop140 +; NO-SIMD128-NEXT: i32.lt_u $push5=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push6=, $pop142, $pop139, $pop5 +; NO-SIMD128-NEXT: i32.store8 0($pop8), $pop6 +; NO-SIMD128-NEXT: i32.const $push11=, 13 ; NO-SIMD128-NEXT: i32.add $push12=, $0, $pop11 -; NO-SIMD128-NEXT: i32.const $push116=, 255 -; NO-SIMD128-NEXT: i32.and $push8=, $15, $pop116 -; NO-SIMD128-NEXT: i32.const $push115=, 255 -; NO-SIMD128-NEXT: i32.and $push7=, $31, $pop115 -; NO-SIMD128-NEXT: i32.lt_u $push9=, $pop8, $pop7 -; NO-SIMD128-NEXT: i32.select $push10=, $15, $31, $pop9 +; NO-SIMD128-NEXT: i32.const $push138=, 255 +; NO-SIMD128-NEXT: i32.and $push137=, $14, $pop138 +; NO-SIMD128-NEXT: local.tee $push136=, $32=, $pop137 +; NO-SIMD128-NEXT: i32.const $push135=, 255 +; NO-SIMD128-NEXT: i32.and $push134=, $30, $pop135 +; NO-SIMD128-NEXT: local.tee $push133=, $16=, $pop134 +; NO-SIMD128-NEXT: i32.lt_u $push9=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push10=, $pop136, $pop133, $pop9 ; NO-SIMD128-NEXT: i32.store8 0($pop12), $pop10 -; NO-SIMD128-NEXT: i32.const $push17=, 13 -; NO-SIMD128-NEXT: i32.add $push18=, $0, $pop17 -; NO-SIMD128-NEXT: i32.const $push114=, 255 -; NO-SIMD128-NEXT: i32.and $push14=, $14, $pop114 -; NO-SIMD128-NEXT: i32.const $push113=, 255 -; NO-SIMD128-NEXT: i32.and $push13=, $30, $pop113 -; NO-SIMD128-NEXT: i32.lt_u $push15=, $pop14, $pop13 -; NO-SIMD128-NEXT: i32.select $push16=, $14, $30, $pop15 -; NO-SIMD128-NEXT: i32.store8 0($pop18), $pop16 -; NO-SIMD128-NEXT: i32.const $push23=, 12 +; NO-SIMD128-NEXT: i32.const $push15=, 12 +; NO-SIMD128-NEXT: i32.add $push16=, $0, $pop15 +; NO-SIMD128-NEXT: i32.const $push132=, 255 +; NO-SIMD128-NEXT: i32.and $push131=, $13, $pop132 +; NO-SIMD128-NEXT: local.tee $push130=, $32=, $pop131 +; NO-SIMD128-NEXT: i32.const $push129=, 255 +; NO-SIMD128-NEXT: i32.and $push128=, $29, $pop129 +; NO-SIMD128-NEXT: local.tee $push127=, $16=, $pop128 +; NO-SIMD128-NEXT: i32.lt_u $push13=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push14=, $pop130, $pop127, $pop13 +; NO-SIMD128-NEXT: i32.store8 0($pop16), $pop14 +; NO-SIMD128-NEXT: i32.const $push19=, 11 +; NO-SIMD128-NEXT: i32.add $push20=, $0, $pop19 +; NO-SIMD128-NEXT: i32.const $push126=, 255 +; NO-SIMD128-NEXT: i32.and $push125=, $12, $pop126 +; NO-SIMD128-NEXT: local.tee $push124=, $32=, $pop125 +; NO-SIMD128-NEXT: i32.const $push123=, 255 +; NO-SIMD128-NEXT: i32.and $push122=, $28, $pop123 +; NO-SIMD128-NEXT: local.tee $push121=, $16=, $pop122 +; NO-SIMD128-NEXT: i32.lt_u $push17=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push18=, $pop124, $pop121, $pop17 +; NO-SIMD128-NEXT: i32.store8 0($pop20), $pop18 +; NO-SIMD128-NEXT: i32.const $push23=, 10 ; NO-SIMD128-NEXT: i32.add $push24=, $0, $pop23 -; NO-SIMD128-NEXT: i32.const $push112=, 255 -; NO-SIMD128-NEXT: i32.and $push20=, $13, $pop112 -; NO-SIMD128-NEXT: i32.const $push111=, 255 -; NO-SIMD128-NEXT: i32.and $push19=, $29, $pop111 -; NO-SIMD128-NEXT: i32.lt_u $push21=, $pop20, $pop19 -; NO-SIMD128-NEXT: i32.select $push22=, $13, $29, $pop21 +; NO-SIMD128-NEXT: i32.const $push120=, 255 +; NO-SIMD128-NEXT: i32.and $push119=, $11, $pop120 +; NO-SIMD128-NEXT: local.tee $push118=, $32=, $pop119 +; NO-SIMD128-NEXT: i32.const $push117=, 255 +; NO-SIMD128-NEXT: i32.and $push116=, $27, $pop117 +; NO-SIMD128-NEXT: local.tee $push115=, $16=, $pop116 +; NO-SIMD128-NEXT: i32.lt_u $push21=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push22=, $pop118, $pop115, $pop21 ; NO-SIMD128-NEXT: i32.store8 0($pop24), $pop22 -; NO-SIMD128-NEXT: i32.const $push29=, 11 -; NO-SIMD128-NEXT: i32.add $push30=, $0, $pop29 -; NO-SIMD128-NEXT: i32.const $push110=, 255 -; NO-SIMD128-NEXT: i32.and $push26=, $12, $pop110 -; NO-SIMD128-NEXT: i32.const $push109=, 255 -; NO-SIMD128-NEXT: i32.and $push25=, $28, $pop109 -; NO-SIMD128-NEXT: i32.lt_u $push27=, $pop26, $pop25 -; NO-SIMD128-NEXT: i32.select $push28=, $12, $28, $pop27 -; NO-SIMD128-NEXT: i32.store8 0($pop30), $pop28 -; NO-SIMD128-NEXT: i32.const $push35=, 10 -; NO-SIMD128-NEXT: i32.add $push36=, $0, $pop35 +; NO-SIMD128-NEXT: i32.const $push27=, 9 +; NO-SIMD128-NEXT: i32.add $push28=, $0, $pop27 +; NO-SIMD128-NEXT: i32.const $push114=, 255 +; NO-SIMD128-NEXT: i32.and $push113=, $10, $pop114 +; NO-SIMD128-NEXT: local.tee $push112=, $32=, $pop113 +; NO-SIMD128-NEXT: i32.const $push111=, 255 +; NO-SIMD128-NEXT: i32.and $push110=, $26, $pop111 +; NO-SIMD128-NEXT: local.tee $push109=, $16=, $pop110 +; NO-SIMD128-NEXT: i32.lt_u $push25=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push26=, $pop112, $pop109, $pop25 +; NO-SIMD128-NEXT: i32.store8 0($pop28), $pop26 ; NO-SIMD128-NEXT: i32.const $push108=, 255 -; NO-SIMD128-NEXT: i32.and $push32=, $11, $pop108 -; NO-SIMD128-NEXT: i32.const $push107=, 255 -; NO-SIMD128-NEXT: i32.and $push31=, $27, $pop107 -; NO-SIMD128-NEXT: i32.lt_u $push33=, $pop32, $pop31 -; NO-SIMD128-NEXT: i32.select $push34=, $11, $27, $pop33 -; NO-SIMD128-NEXT: i32.store8 0($pop36), $pop34 -; NO-SIMD128-NEXT: i32.const $push41=, 9 -; NO-SIMD128-NEXT: i32.add $push42=, $0, $pop41 -; NO-SIMD128-NEXT: i32.const $push106=, 255 -; NO-SIMD128-NEXT: i32.and $push38=, $10, $pop106 +; NO-SIMD128-NEXT: i32.and $push107=, $9, $pop108 +; NO-SIMD128-NEXT: local.tee $push106=, $32=, $pop107 ; NO-SIMD128-NEXT: i32.const $push105=, 255 -; NO-SIMD128-NEXT: i32.and $push37=, $26, $pop105 -; NO-SIMD128-NEXT: i32.lt_u $push39=, $pop38, $pop37 -; NO-SIMD128-NEXT: i32.select $push40=, $10, $26, $pop39 -; NO-SIMD128-NEXT: i32.store8 0($pop42), $pop40 -; NO-SIMD128-NEXT: i32.const $push104=, 255 -; NO-SIMD128-NEXT: i32.and $push44=, $9, $pop104 -; NO-SIMD128-NEXT: i32.const $push103=, 255 -; NO-SIMD128-NEXT: i32.and $push43=, $25, $pop103 -; NO-SIMD128-NEXT: i32.lt_u $push45=, $pop44, $pop43 -; NO-SIMD128-NEXT: i32.select $push46=, $9, $25, $pop45 -; NO-SIMD128-NEXT: i32.store8 8($0), $pop46 -; NO-SIMD128-NEXT: i32.const $push51=, 7 -; NO-SIMD128-NEXT: i32.add $push52=, $0, $pop51 +; NO-SIMD128-NEXT: i32.and $push104=, $25, $pop105 +; NO-SIMD128-NEXT: local.tee $push103=, $16=, $pop104 +; NO-SIMD128-NEXT: i32.lt_u $push29=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push30=, $pop106, $pop103, $pop29 +; NO-SIMD128-NEXT: i32.store8 8($0), $pop30 +; NO-SIMD128-NEXT: i32.const $push33=, 7 +; NO-SIMD128-NEXT: i32.add $push34=, $0, $pop33 ; NO-SIMD128-NEXT: i32.const $push102=, 255 -; NO-SIMD128-NEXT: i32.and $push48=, $8, $pop102 -; NO-SIMD128-NEXT: i32.const $push101=, 255 -; NO-SIMD128-NEXT: i32.and $push47=, $24, $pop101 -; NO-SIMD128-NEXT: i32.lt_u $push49=, $pop48, $pop47 -; NO-SIMD128-NEXT: i32.select $push50=, $8, $24, $pop49 -; NO-SIMD128-NEXT: i32.store8 0($pop52), $pop50 -; NO-SIMD128-NEXT: i32.const $push57=, 6 -; NO-SIMD128-NEXT: i32.add $push58=, $0, $pop57 -; NO-SIMD128-NEXT: i32.const $push100=, 255 -; NO-SIMD128-NEXT: i32.and $push54=, $7, $pop100 +; NO-SIMD128-NEXT: i32.and $push101=, $8, $pop102 +; NO-SIMD128-NEXT: local.tee $push100=, $32=, $pop101 ; NO-SIMD128-NEXT: i32.const $push99=, 255 -; NO-SIMD128-NEXT: i32.and $push53=, $23, $pop99 -; NO-SIMD128-NEXT: i32.lt_u $push55=, $pop54, $pop53 -; NO-SIMD128-NEXT: i32.select $push56=, $7, $23, $pop55 -; NO-SIMD128-NEXT: i32.store8 0($pop58), $pop56 -; NO-SIMD128-NEXT: i32.const $push63=, 5 -; NO-SIMD128-NEXT: i32.add $push64=, $0, $pop63 -; NO-SIMD128-NEXT: i32.const $push98=, 255 -; NO-SIMD128-NEXT: i32.and $push60=, $6, $pop98 -; NO-SIMD128-NEXT: i32.const $push97=, 255 -; NO-SIMD128-NEXT: i32.and $push59=, $22, $pop97 -; NO-SIMD128-NEXT: i32.lt_u $push61=, $pop60, $pop59 -; NO-SIMD128-NEXT: i32.select $push62=, $6, $22, $pop61 -; NO-SIMD128-NEXT: i32.store8 0($pop64), $pop62 +; NO-SIMD128-NEXT: i32.and $push98=, $24, $pop99 +; NO-SIMD128-NEXT: local.tee $push97=, $16=, $pop98 +; NO-SIMD128-NEXT: i32.lt_u $push31=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push32=, $pop100, $pop97, $pop31 +; NO-SIMD128-NEXT: i32.store8 0($pop34), $pop32 +; NO-SIMD128-NEXT: i32.const $push37=, 6 +; NO-SIMD128-NEXT: i32.add $push38=, $0, $pop37 ; NO-SIMD128-NEXT: i32.const $push96=, 255 -; NO-SIMD128-NEXT: i32.and $push66=, $5, $pop96 -; NO-SIMD128-NEXT: i32.const $push95=, 255 -; NO-SIMD128-NEXT: i32.and $push65=, $21, $pop95 -; NO-SIMD128-NEXT: i32.lt_u $push67=, $pop66, $pop65 -; NO-SIMD128-NEXT: i32.select $push68=, $5, $21, $pop67 -; NO-SIMD128-NEXT: i32.store8 4($0), $pop68 -; NO-SIMD128-NEXT: i32.const $push73=, 3 -; NO-SIMD128-NEXT: i32.add $push74=, $0, $pop73 -; NO-SIMD128-NEXT: i32.const $push94=, 255 -; NO-SIMD128-NEXT: i32.and $push70=, $4, $pop94 +; NO-SIMD128-NEXT: i32.and $push95=, $7, $pop96 +; NO-SIMD128-NEXT: local.tee $push94=, $32=, $pop95 ; NO-SIMD128-NEXT: i32.const $push93=, 255 -; NO-SIMD128-NEXT: i32.and $push69=, $20, $pop93 -; NO-SIMD128-NEXT: i32.lt_u $push71=, $pop70, $pop69 -; NO-SIMD128-NEXT: i32.select $push72=, $4, $20, $pop71 -; NO-SIMD128-NEXT: i32.store8 0($pop74), $pop72 -; NO-SIMD128-NEXT: i32.const $push92=, 255 -; NO-SIMD128-NEXT: i32.and $push76=, $3, $pop92 -; NO-SIMD128-NEXT: i32.const $push91=, 255 -; NO-SIMD128-NEXT: i32.and $push75=, $19, $pop91 -; NO-SIMD128-NEXT: i32.lt_u $push77=, $pop76, $pop75 -; NO-SIMD128-NEXT: i32.select $push78=, $3, $19, $pop77 -; NO-SIMD128-NEXT: i32.store8 2($0), $pop78 +; NO-SIMD128-NEXT: i32.and $push92=, $23, $pop93 +; NO-SIMD128-NEXT: local.tee $push91=, $16=, $pop92 +; NO-SIMD128-NEXT: i32.lt_u $push35=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push36=, $pop94, $pop91, $pop35 +; NO-SIMD128-NEXT: i32.store8 0($pop38), $pop36 +; NO-SIMD128-NEXT: i32.const $push41=, 5 +; NO-SIMD128-NEXT: i32.add $push42=, $0, $pop41 ; NO-SIMD128-NEXT: i32.const $push90=, 255 -; NO-SIMD128-NEXT: i32.and $push80=, $2, $pop90 -; NO-SIMD128-NEXT: i32.const $push89=, 255 -; NO-SIMD128-NEXT: i32.and $push79=, $18, $pop89 -; NO-SIMD128-NEXT: i32.lt_u $push81=, $pop80, $pop79 -; NO-SIMD128-NEXT: i32.select $push82=, $2, $18, $pop81 -; NO-SIMD128-NEXT: i32.store8 1($0), $pop82 -; NO-SIMD128-NEXT: i32.const $push88=, 255 -; NO-SIMD128-NEXT: i32.and $push84=, $1, $pop88 +; NO-SIMD128-NEXT: i32.and $push89=, $6, $pop90 +; NO-SIMD128-NEXT: local.tee $push88=, $32=, $pop89 ; NO-SIMD128-NEXT: i32.const $push87=, 255 -; NO-SIMD128-NEXT: i32.and $push83=, $17, $pop87 -; NO-SIMD128-NEXT: i32.lt_u $push85=, $pop84, $pop83 -; NO-SIMD128-NEXT: i32.select $push86=, $1, $17, $pop85 -; NO-SIMD128-NEXT: i32.store8 0($0), $pop86 +; NO-SIMD128-NEXT: i32.and $push86=, $22, $pop87 +; NO-SIMD128-NEXT: local.tee $push85=, $16=, $pop86 +; NO-SIMD128-NEXT: i32.lt_u $push39=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push40=, $pop88, $pop85, $pop39 +; NO-SIMD128-NEXT: i32.store8 0($pop42), $pop40 +; NO-SIMD128-NEXT: i32.const $push84=, 255 +; NO-SIMD128-NEXT: i32.and $push83=, $5, $pop84 +; NO-SIMD128-NEXT: local.tee $push82=, $32=, $pop83 +; NO-SIMD128-NEXT: i32.const $push81=, 255 +; NO-SIMD128-NEXT: i32.and $push80=, $21, $pop81 +; NO-SIMD128-NEXT: local.tee $push79=, $16=, $pop80 +; NO-SIMD128-NEXT: i32.lt_u $push43=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push44=, $pop82, $pop79, $pop43 +; NO-SIMD128-NEXT: i32.store8 4($0), $pop44 +; NO-SIMD128-NEXT: i32.const $push47=, 3 +; NO-SIMD128-NEXT: i32.add $push48=, $0, $pop47 +; NO-SIMD128-NEXT: i32.const $push78=, 255 +; NO-SIMD128-NEXT: i32.and $push77=, $4, $pop78 +; NO-SIMD128-NEXT: local.tee $push76=, $32=, $pop77 +; NO-SIMD128-NEXT: i32.const $push75=, 255 +; NO-SIMD128-NEXT: i32.and $push74=, $20, $pop75 +; NO-SIMD128-NEXT: local.tee $push73=, $16=, $pop74 +; NO-SIMD128-NEXT: i32.lt_u $push45=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push46=, $pop76, $pop73, $pop45 +; NO-SIMD128-NEXT: i32.store8 0($pop48), $pop46 +; NO-SIMD128-NEXT: i32.const $push72=, 255 +; NO-SIMD128-NEXT: i32.and $push71=, $3, $pop72 +; NO-SIMD128-NEXT: local.tee $push70=, $32=, $pop71 +; NO-SIMD128-NEXT: i32.const $push69=, 255 +; NO-SIMD128-NEXT: i32.and $push68=, $19, $pop69 +; NO-SIMD128-NEXT: local.tee $push67=, $16=, $pop68 +; NO-SIMD128-NEXT: i32.lt_u $push49=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push50=, $pop70, $pop67, $pop49 +; NO-SIMD128-NEXT: i32.store8 2($0), $pop50 +; NO-SIMD128-NEXT: i32.const $push66=, 255 +; NO-SIMD128-NEXT: i32.and $push65=, $2, $pop66 +; NO-SIMD128-NEXT: local.tee $push64=, $32=, $pop65 +; NO-SIMD128-NEXT: i32.const $push63=, 255 +; NO-SIMD128-NEXT: i32.and $push62=, $18, $pop63 +; NO-SIMD128-NEXT: local.tee $push61=, $16=, $pop62 +; NO-SIMD128-NEXT: i32.lt_u $push51=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push52=, $pop64, $pop61, $pop51 +; NO-SIMD128-NEXT: i32.store8 1($0), $pop52 +; NO-SIMD128-NEXT: i32.const $push60=, 255 +; NO-SIMD128-NEXT: i32.and $push59=, $1, $pop60 +; NO-SIMD128-NEXT: local.tee $push58=, $32=, $pop59 +; NO-SIMD128-NEXT: i32.const $push57=, 255 +; NO-SIMD128-NEXT: i32.and $push56=, $17, $pop57 +; NO-SIMD128-NEXT: local.tee $push55=, $16=, $pop56 +; NO-SIMD128-NEXT: i32.lt_u $push53=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push54=, $pop58, $pop55, $pop53 +; NO-SIMD128-NEXT: i32.store8 0($0), $pop54 ; NO-SIMD128-NEXT: return ; ; NO-SIMD128-FAST-LABEL: min_u_v16i8: ; NO-SIMD128-FAST: .functype min_u_v16i8 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> () ; NO-SIMD128-FAST-NEXT: # %bb.0: ; NO-SIMD128-FAST-NEXT: i32.const $push0=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push2=, $1, $pop0 +; NO-SIMD128-FAST-NEXT: i32.and $push149=, $1, $pop0 +; NO-SIMD128-FAST-NEXT: local.tee $push148=, $1=, $pop149 +; NO-SIMD128-FAST-NEXT: i32.const $push147=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push146=, $17, $pop147 +; NO-SIMD128-FAST-NEXT: local.tee $push145=, $17=, $pop146 +; NO-SIMD128-FAST-NEXT: i32.lt_u $push1=, $1, $17 +; NO-SIMD128-FAST-NEXT: i32.select $push2=, $pop148, $pop145, $pop1 +; NO-SIMD128-FAST-NEXT: i32.store8 0($0), $pop2 +; NO-SIMD128-FAST-NEXT: i32.const $push144=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push143=, $2, $pop144 +; NO-SIMD128-FAST-NEXT: local.tee $push142=, $17=, $pop143 +; NO-SIMD128-FAST-NEXT: i32.const $push141=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push140=, $18, $pop141 +; NO-SIMD128-FAST-NEXT: local.tee $push139=, $18=, $pop140 +; NO-SIMD128-FAST-NEXT: i32.lt_u $push3=, $17, $18 +; NO-SIMD128-FAST-NEXT: i32.select $push4=, $pop142, $pop139, $pop3 +; NO-SIMD128-FAST-NEXT: i32.store8 1($0), $pop4 +; NO-SIMD128-FAST-NEXT: i32.const $push138=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push137=, $3, $pop138 +; NO-SIMD128-FAST-NEXT: local.tee $push136=, $18=, $pop137 +; NO-SIMD128-FAST-NEXT: i32.const $push135=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push134=, $19, $pop135 +; NO-SIMD128-FAST-NEXT: local.tee $push133=, $19=, $pop134 +; NO-SIMD128-FAST-NEXT: i32.lt_u $push5=, $18, $19 +; NO-SIMD128-FAST-NEXT: i32.select $push6=, $pop136, $pop133, $pop5 +; NO-SIMD128-FAST-NEXT: i32.store8 2($0), $pop6 +; NO-SIMD128-FAST-NEXT: i32.const $push9=, 3 +; NO-SIMD128-FAST-NEXT: i32.add $push10=, $0, $pop9 +; NO-SIMD128-FAST-NEXT: i32.const $push132=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push131=, $4, $pop132 +; NO-SIMD128-FAST-NEXT: local.tee $push130=, $19=, $pop131 +; NO-SIMD128-FAST-NEXT: i32.const $push129=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push128=, $20, $pop129 +; NO-SIMD128-FAST-NEXT: local.tee $push127=, $20=, $pop128 +; NO-SIMD128-FAST-NEXT: i32.lt_u $push7=, $19, $20 +; NO-SIMD128-FAST-NEXT: i32.select $push8=, $pop130, $pop127, $pop7 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop10), $pop8 +; NO-SIMD128-FAST-NEXT: i32.const $push126=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push125=, $5, $pop126 +; NO-SIMD128-FAST-NEXT: local.tee $push124=, $20=, $pop125 +; NO-SIMD128-FAST-NEXT: i32.const $push123=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push122=, $21, $pop123 +; NO-SIMD128-FAST-NEXT: local.tee $push121=, $21=, $pop122 +; NO-SIMD128-FAST-NEXT: i32.lt_u $push11=, $20, $21 +; NO-SIMD128-FAST-NEXT: i32.select $push12=, $pop124, $pop121, $pop11 +; NO-SIMD128-FAST-NEXT: i32.store8 4($0), $pop12 +; NO-SIMD128-FAST-NEXT: i32.const $push15=, 5 +; NO-SIMD128-FAST-NEXT: i32.add $push16=, $0, $pop15 +; NO-SIMD128-FAST-NEXT: i32.const $push120=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push119=, $6, $pop120 +; NO-SIMD128-FAST-NEXT: local.tee $push118=, $21=, $pop119 ; NO-SIMD128-FAST-NEXT: i32.const $push117=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push1=, $17, $pop117 -; NO-SIMD128-FAST-NEXT: i32.lt_u $push3=, $pop2, $pop1 -; NO-SIMD128-FAST-NEXT: i32.select $push4=, $1, $17, $pop3 -; NO-SIMD128-FAST-NEXT: i32.store8 0($0), $pop4 -; NO-SIMD128-FAST-NEXT: i32.const $push116=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push6=, $2, $pop116 -; NO-SIMD128-FAST-NEXT: i32.const $push115=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push5=, $18, $pop115 -; NO-SIMD128-FAST-NEXT: i32.lt_u $push7=, $pop6, $pop5 -; NO-SIMD128-FAST-NEXT: i32.select $push8=, $2, $18, $pop7 -; NO-SIMD128-FAST-NEXT: i32.store8 1($0), $pop8 +; NO-SIMD128-FAST-NEXT: i32.and $push116=, $22, $pop117 +; NO-SIMD128-FAST-NEXT: local.tee $push115=, $22=, $pop116 +; NO-SIMD128-FAST-NEXT: i32.lt_u $push13=, $21, $22 +; NO-SIMD128-FAST-NEXT: i32.select $push14=, $pop118, $pop115, $pop13 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop16), $pop14 +; NO-SIMD128-FAST-NEXT: i32.const $push19=, 6 +; NO-SIMD128-FAST-NEXT: i32.add $push20=, $0, $pop19 ; NO-SIMD128-FAST-NEXT: i32.const $push114=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push10=, $3, $pop114 -; NO-SIMD128-FAST-NEXT: i32.const $push113=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push9=, $19, $pop113 -; NO-SIMD128-FAST-NEXT: i32.lt_u $push11=, $pop10, $pop9 -; NO-SIMD128-FAST-NEXT: i32.select $push12=, $3, $19, $pop11 -; NO-SIMD128-FAST-NEXT: i32.store8 2($0), $pop12 -; NO-SIMD128-FAST-NEXT: i32.const $push17=, 3 -; NO-SIMD128-FAST-NEXT: i32.add $push18=, $0, $pop17 -; NO-SIMD128-FAST-NEXT: i32.const $push112=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push14=, $4, $pop112 +; NO-SIMD128-FAST-NEXT: i32.and $push113=, $7, $pop114 +; NO-SIMD128-FAST-NEXT: local.tee $push112=, $22=, $pop113 ; NO-SIMD128-FAST-NEXT: i32.const $push111=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push13=, $20, $pop111 -; NO-SIMD128-FAST-NEXT: i32.lt_u $push15=, $pop14, $pop13 -; NO-SIMD128-FAST-NEXT: i32.select $push16=, $4, $20, $pop15 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop18), $pop16 -; NO-SIMD128-FAST-NEXT: i32.const $push110=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push20=, $5, $pop110 -; NO-SIMD128-FAST-NEXT: i32.const $push109=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push19=, $21, $pop109 -; NO-SIMD128-FAST-NEXT: i32.lt_u $push21=, $pop20, $pop19 -; NO-SIMD128-FAST-NEXT: i32.select $push22=, $5, $21, $pop21 -; NO-SIMD128-FAST-NEXT: i32.store8 4($0), $pop22 -; NO-SIMD128-FAST-NEXT: i32.const $push27=, 5 -; NO-SIMD128-FAST-NEXT: i32.add $push28=, $0, $pop27 +; NO-SIMD128-FAST-NEXT: i32.and $push110=, $23, $pop111 +; NO-SIMD128-FAST-NEXT: local.tee $push109=, $23=, $pop110 +; NO-SIMD128-FAST-NEXT: i32.lt_u $push17=, $22, $23 +; NO-SIMD128-FAST-NEXT: i32.select $push18=, $pop112, $pop109, $pop17 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop20), $pop18 +; NO-SIMD128-FAST-NEXT: i32.const $push23=, 7 +; NO-SIMD128-FAST-NEXT: i32.add $push24=, $0, $pop23 ; NO-SIMD128-FAST-NEXT: i32.const $push108=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push24=, $6, $pop108 -; NO-SIMD128-FAST-NEXT: i32.const $push107=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push23=, $22, $pop107 -; NO-SIMD128-FAST-NEXT: i32.lt_u $push25=, $pop24, $pop23 -; NO-SIMD128-FAST-NEXT: i32.select $push26=, $6, $22, $pop25 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop28), $pop26 -; NO-SIMD128-FAST-NEXT: i32.const $push33=, 6 -; NO-SIMD128-FAST-NEXT: i32.add $push34=, $0, $pop33 -; NO-SIMD128-FAST-NEXT: i32.const $push106=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push30=, $7, $pop106 +; NO-SIMD128-FAST-NEXT: i32.and $push107=, $8, $pop108 +; NO-SIMD128-FAST-NEXT: local.tee $push106=, $23=, $pop107 ; NO-SIMD128-FAST-NEXT: i32.const $push105=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push29=, $23, $pop105 -; NO-SIMD128-FAST-NEXT: i32.lt_u $push31=, $pop30, $pop29 -; NO-SIMD128-FAST-NEXT: i32.select $push32=, $7, $23, $pop31 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop34), $pop32 -; NO-SIMD128-FAST-NEXT: i32.const $push39=, 7 -; NO-SIMD128-FAST-NEXT: i32.add $push40=, $0, $pop39 -; NO-SIMD128-FAST-NEXT: i32.const $push104=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push36=, $8, $pop104 -; NO-SIMD128-FAST-NEXT: i32.const $push103=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push35=, $24, $pop103 -; NO-SIMD128-FAST-NEXT: i32.lt_u $push37=, $pop36, $pop35 -; NO-SIMD128-FAST-NEXT: i32.select $push38=, $8, $24, $pop37 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop40), $pop38 +; NO-SIMD128-FAST-NEXT: i32.and $push104=, $24, $pop105 +; NO-SIMD128-FAST-NEXT: local.tee $push103=, $24=, $pop104 +; NO-SIMD128-FAST-NEXT: i32.lt_u $push21=, $23, $24 +; NO-SIMD128-FAST-NEXT: i32.select $push22=, $pop106, $pop103, $pop21 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop24), $pop22 ; NO-SIMD128-FAST-NEXT: i32.const $push102=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push42=, $9, $pop102 -; NO-SIMD128-FAST-NEXT: i32.const $push101=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push41=, $25, $pop101 -; NO-SIMD128-FAST-NEXT: i32.lt_u $push43=, $pop42, $pop41 -; NO-SIMD128-FAST-NEXT: i32.select $push44=, $9, $25, $pop43 -; NO-SIMD128-FAST-NEXT: i32.store8 8($0), $pop44 -; NO-SIMD128-FAST-NEXT: i32.const $push49=, 9 -; NO-SIMD128-FAST-NEXT: i32.add $push50=, $0, $pop49 -; NO-SIMD128-FAST-NEXT: i32.const $push100=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push46=, $10, $pop100 +; NO-SIMD128-FAST-NEXT: i32.and $push101=, $9, $pop102 +; NO-SIMD128-FAST-NEXT: local.tee $push100=, $24=, $pop101 ; NO-SIMD128-FAST-NEXT: i32.const $push99=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push45=, $26, $pop99 -; NO-SIMD128-FAST-NEXT: i32.lt_u $push47=, $pop46, $pop45 -; NO-SIMD128-FAST-NEXT: i32.select $push48=, $10, $26, $pop47 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop50), $pop48 -; NO-SIMD128-FAST-NEXT: i32.const $push55=, 10 -; NO-SIMD128-FAST-NEXT: i32.add $push56=, $0, $pop55 -; NO-SIMD128-FAST-NEXT: i32.const $push98=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push52=, $11, $pop98 -; NO-SIMD128-FAST-NEXT: i32.const $push97=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push51=, $27, $pop97 -; NO-SIMD128-FAST-NEXT: i32.lt_u $push53=, $pop52, $pop51 -; NO-SIMD128-FAST-NEXT: i32.select $push54=, $11, $27, $pop53 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop56), $pop54 -; NO-SIMD128-FAST-NEXT: i32.const $push61=, 11 -; NO-SIMD128-FAST-NEXT: i32.add $push62=, $0, $pop61 +; NO-SIMD128-FAST-NEXT: i32.and $push98=, $25, $pop99 +; NO-SIMD128-FAST-NEXT: local.tee $push97=, $25=, $pop98 +; NO-SIMD128-FAST-NEXT: i32.lt_u $push25=, $24, $25 +; NO-SIMD128-FAST-NEXT: i32.select $push26=, $pop100, $pop97, $pop25 +; NO-SIMD128-FAST-NEXT: i32.store8 8($0), $pop26 +; NO-SIMD128-FAST-NEXT: i32.const $push29=, 9 +; NO-SIMD128-FAST-NEXT: i32.add $push30=, $0, $pop29 ; NO-SIMD128-FAST-NEXT: i32.const $push96=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push58=, $12, $pop96 -; NO-SIMD128-FAST-NEXT: i32.const $push95=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push57=, $28, $pop95 -; NO-SIMD128-FAST-NEXT: i32.lt_u $push59=, $pop58, $pop57 -; NO-SIMD128-FAST-NEXT: i32.select $push60=, $12, $28, $pop59 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop62), $pop60 -; NO-SIMD128-FAST-NEXT: i32.const $push67=, 12 -; NO-SIMD128-FAST-NEXT: i32.add $push68=, $0, $pop67 -; NO-SIMD128-FAST-NEXT: i32.const $push94=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push64=, $13, $pop94 +; NO-SIMD128-FAST-NEXT: i32.and $push95=, $10, $pop96 +; NO-SIMD128-FAST-NEXT: local.tee $push94=, $25=, $pop95 ; NO-SIMD128-FAST-NEXT: i32.const $push93=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push63=, $29, $pop93 -; NO-SIMD128-FAST-NEXT: i32.lt_u $push65=, $pop64, $pop63 -; NO-SIMD128-FAST-NEXT: i32.select $push66=, $13, $29, $pop65 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop68), $pop66 -; NO-SIMD128-FAST-NEXT: i32.const $push73=, 13 -; NO-SIMD128-FAST-NEXT: i32.add $push74=, $0, $pop73 -; NO-SIMD128-FAST-NEXT: i32.const $push92=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push70=, $14, $pop92 -; NO-SIMD128-FAST-NEXT: i32.const $push91=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push69=, $30, $pop91 -; NO-SIMD128-FAST-NEXT: i32.lt_u $push71=, $pop70, $pop69 -; NO-SIMD128-FAST-NEXT: i32.select $push72=, $14, $30, $pop71 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop74), $pop72 -; NO-SIMD128-FAST-NEXT: i32.const $push79=, 14 -; NO-SIMD128-FAST-NEXT: i32.add $push80=, $0, $pop79 +; NO-SIMD128-FAST-NEXT: i32.and $push92=, $26, $pop93 +; NO-SIMD128-FAST-NEXT: local.tee $push91=, $26=, $pop92 +; NO-SIMD128-FAST-NEXT: i32.lt_u $push27=, $25, $26 +; NO-SIMD128-FAST-NEXT: i32.select $push28=, $pop94, $pop91, $pop27 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop30), $pop28 +; NO-SIMD128-FAST-NEXT: i32.const $push33=, 10 +; NO-SIMD128-FAST-NEXT: i32.add $push34=, $0, $pop33 ; NO-SIMD128-FAST-NEXT: i32.const $push90=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push76=, $15, $pop90 -; NO-SIMD128-FAST-NEXT: i32.const $push89=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push75=, $31, $pop89 -; NO-SIMD128-FAST-NEXT: i32.lt_u $push77=, $pop76, $pop75 -; NO-SIMD128-FAST-NEXT: i32.select $push78=, $15, $31, $pop77 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop80), $pop78 -; NO-SIMD128-FAST-NEXT: i32.const $push85=, 15 -; NO-SIMD128-FAST-NEXT: i32.add $push86=, $0, $pop85 -; NO-SIMD128-FAST-NEXT: i32.const $push88=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push82=, $16, $pop88 +; NO-SIMD128-FAST-NEXT: i32.and $push89=, $11, $pop90 +; NO-SIMD128-FAST-NEXT: local.tee $push88=, $26=, $pop89 ; NO-SIMD128-FAST-NEXT: i32.const $push87=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push81=, $32, $pop87 -; NO-SIMD128-FAST-NEXT: i32.lt_u $push83=, $pop82, $pop81 -; NO-SIMD128-FAST-NEXT: i32.select $push84=, $16, $32, $pop83 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop86), $pop84 +; NO-SIMD128-FAST-NEXT: i32.and $push86=, $27, $pop87 +; NO-SIMD128-FAST-NEXT: local.tee $push85=, $27=, $pop86 +; NO-SIMD128-FAST-NEXT: i32.lt_u $push31=, $26, $27 +; NO-SIMD128-FAST-NEXT: i32.select $push32=, $pop88, $pop85, $pop31 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop34), $pop32 +; NO-SIMD128-FAST-NEXT: i32.const $push37=, 11 +; NO-SIMD128-FAST-NEXT: i32.add $push38=, $0, $pop37 +; NO-SIMD128-FAST-NEXT: i32.const $push84=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push83=, $12, $pop84 +; NO-SIMD128-FAST-NEXT: local.tee $push82=, $27=, $pop83 +; NO-SIMD128-FAST-NEXT: i32.const $push81=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push80=, $28, $pop81 +; NO-SIMD128-FAST-NEXT: local.tee $push79=, $28=, $pop80 +; NO-SIMD128-FAST-NEXT: i32.lt_u $push35=, $27, $28 +; NO-SIMD128-FAST-NEXT: i32.select $push36=, $pop82, $pop79, $pop35 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop38), $pop36 +; NO-SIMD128-FAST-NEXT: i32.const $push41=, 12 +; NO-SIMD128-FAST-NEXT: i32.add $push42=, $0, $pop41 +; NO-SIMD128-FAST-NEXT: i32.const $push78=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push77=, $13, $pop78 +; NO-SIMD128-FAST-NEXT: local.tee $push76=, $28=, $pop77 +; NO-SIMD128-FAST-NEXT: i32.const $push75=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push74=, $29, $pop75 +; NO-SIMD128-FAST-NEXT: local.tee $push73=, $29=, $pop74 +; NO-SIMD128-FAST-NEXT: i32.lt_u $push39=, $28, $29 +; NO-SIMD128-FAST-NEXT: i32.select $push40=, $pop76, $pop73, $pop39 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop42), $pop40 +; NO-SIMD128-FAST-NEXT: i32.const $push45=, 13 +; NO-SIMD128-FAST-NEXT: i32.add $push46=, $0, $pop45 +; NO-SIMD128-FAST-NEXT: i32.const $push72=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push71=, $14, $pop72 +; NO-SIMD128-FAST-NEXT: local.tee $push70=, $29=, $pop71 +; NO-SIMD128-FAST-NEXT: i32.const $push69=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push68=, $30, $pop69 +; NO-SIMD128-FAST-NEXT: local.tee $push67=, $30=, $pop68 +; NO-SIMD128-FAST-NEXT: i32.lt_u $push43=, $29, $30 +; NO-SIMD128-FAST-NEXT: i32.select $push44=, $pop70, $pop67, $pop43 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop46), $pop44 +; NO-SIMD128-FAST-NEXT: i32.const $push49=, 14 +; NO-SIMD128-FAST-NEXT: i32.add $push50=, $0, $pop49 +; NO-SIMD128-FAST-NEXT: i32.const $push66=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push65=, $15, $pop66 +; NO-SIMD128-FAST-NEXT: local.tee $push64=, $30=, $pop65 +; NO-SIMD128-FAST-NEXT: i32.const $push63=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push62=, $31, $pop63 +; NO-SIMD128-FAST-NEXT: local.tee $push61=, $31=, $pop62 +; NO-SIMD128-FAST-NEXT: i32.lt_u $push47=, $30, $31 +; NO-SIMD128-FAST-NEXT: i32.select $push48=, $pop64, $pop61, $pop47 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop50), $pop48 +; NO-SIMD128-FAST-NEXT: i32.const $push53=, 15 +; NO-SIMD128-FAST-NEXT: i32.add $push54=, $0, $pop53 +; NO-SIMD128-FAST-NEXT: i32.const $push60=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push59=, $16, $pop60 +; NO-SIMD128-FAST-NEXT: local.tee $push58=, $0=, $pop59 +; NO-SIMD128-FAST-NEXT: i32.const $push57=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push56=, $32, $pop57 +; NO-SIMD128-FAST-NEXT: local.tee $push55=, $32=, $pop56 +; NO-SIMD128-FAST-NEXT: i32.lt_u $push51=, $0, $32 +; NO-SIMD128-FAST-NEXT: i32.select $push52=, $pop58, $pop55, $pop51 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop54), $pop52 ; NO-SIMD128-FAST-NEXT: return %c = icmp ult <16 x i8> %x, %y %a = select <16 x i1> %c, <16 x i8> %x, <16 x i8> %y @@ -1085,215 +1213,279 @@ ; NO-SIMD128-LABEL: max_s_v16i8: ; NO-SIMD128: .functype max_s_v16i8 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> () ; NO-SIMD128-NEXT: # %bb.0: -; NO-SIMD128-NEXT: i32.const $push4=, 15 -; NO-SIMD128-NEXT: i32.add $push5=, $0, $pop4 -; NO-SIMD128-NEXT: i32.extend8_s $push1=, $16 -; NO-SIMD128-NEXT: i32.extend8_s $push0=, $32 -; NO-SIMD128-NEXT: i32.gt_s $push2=, $pop1, $pop0 -; NO-SIMD128-NEXT: i32.select $push3=, $16, $32, $pop2 -; NO-SIMD128-NEXT: i32.store8 0($pop5), $pop3 -; NO-SIMD128-NEXT: i32.const $push10=, 14 +; NO-SIMD128-NEXT: i32.const $push2=, 15 +; NO-SIMD128-NEXT: i32.add $push3=, $0, $pop2 +; NO-SIMD128-NEXT: i32.extend8_s $push117=, $16 +; NO-SIMD128-NEXT: local.tee $push116=, $16=, $pop117 +; NO-SIMD128-NEXT: i32.extend8_s $push115=, $32 +; NO-SIMD128-NEXT: local.tee $push114=, $32=, $pop115 +; NO-SIMD128-NEXT: i32.gt_s $push0=, $16, $32 +; NO-SIMD128-NEXT: i32.select $push1=, $pop116, $pop114, $pop0 +; NO-SIMD128-NEXT: i32.store8 0($pop3), $pop1 +; NO-SIMD128-NEXT: i32.const $push6=, 14 +; NO-SIMD128-NEXT: i32.add $push7=, $0, $pop6 +; NO-SIMD128-NEXT: i32.extend8_s $push113=, $15 +; NO-SIMD128-NEXT: local.tee $push112=, $32=, $pop113 +; NO-SIMD128-NEXT: i32.extend8_s $push111=, $31 +; NO-SIMD128-NEXT: local.tee $push110=, $16=, $pop111 +; NO-SIMD128-NEXT: i32.gt_s $push4=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push5=, $pop112, $pop110, $pop4 +; NO-SIMD128-NEXT: i32.store8 0($pop7), $pop5 +; NO-SIMD128-NEXT: i32.const $push10=, 13 ; NO-SIMD128-NEXT: i32.add $push11=, $0, $pop10 -; NO-SIMD128-NEXT: i32.extend8_s $push7=, $15 -; NO-SIMD128-NEXT: i32.extend8_s $push6=, $31 -; NO-SIMD128-NEXT: i32.gt_s $push8=, $pop7, $pop6 -; NO-SIMD128-NEXT: i32.select $push9=, $15, $31, $pop8 +; NO-SIMD128-NEXT: i32.extend8_s $push109=, $14 +; NO-SIMD128-NEXT: local.tee $push108=, $32=, $pop109 +; NO-SIMD128-NEXT: i32.extend8_s $push107=, $30 +; NO-SIMD128-NEXT: local.tee $push106=, $16=, $pop107 +; NO-SIMD128-NEXT: i32.gt_s $push8=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push9=, $pop108, $pop106, $pop8 ; NO-SIMD128-NEXT: i32.store8 0($pop11), $pop9 -; NO-SIMD128-NEXT: i32.const $push16=, 13 -; NO-SIMD128-NEXT: i32.add $push17=, $0, $pop16 -; NO-SIMD128-NEXT: i32.extend8_s $push13=, $14 -; NO-SIMD128-NEXT: i32.extend8_s $push12=, $30 -; NO-SIMD128-NEXT: i32.gt_s $push14=, $pop13, $pop12 -; NO-SIMD128-NEXT: i32.select $push15=, $14, $30, $pop14 -; NO-SIMD128-NEXT: i32.store8 0($pop17), $pop15 -; NO-SIMD128-NEXT: i32.const $push22=, 12 +; NO-SIMD128-NEXT: i32.const $push14=, 12 +; NO-SIMD128-NEXT: i32.add $push15=, $0, $pop14 +; NO-SIMD128-NEXT: i32.extend8_s $push105=, $13 +; NO-SIMD128-NEXT: local.tee $push104=, $32=, $pop105 +; NO-SIMD128-NEXT: i32.extend8_s $push103=, $29 +; NO-SIMD128-NEXT: local.tee $push102=, $16=, $pop103 +; NO-SIMD128-NEXT: i32.gt_s $push12=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push13=, $pop104, $pop102, $pop12 +; NO-SIMD128-NEXT: i32.store8 0($pop15), $pop13 +; NO-SIMD128-NEXT: i32.const $push18=, 11 +; NO-SIMD128-NEXT: i32.add $push19=, $0, $pop18 +; NO-SIMD128-NEXT: i32.extend8_s $push101=, $12 +; NO-SIMD128-NEXT: local.tee $push100=, $32=, $pop101 +; NO-SIMD128-NEXT: i32.extend8_s $push99=, $28 +; NO-SIMD128-NEXT: local.tee $push98=, $16=, $pop99 +; NO-SIMD128-NEXT: i32.gt_s $push16=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push17=, $pop100, $pop98, $pop16 +; NO-SIMD128-NEXT: i32.store8 0($pop19), $pop17 +; NO-SIMD128-NEXT: i32.const $push22=, 10 ; NO-SIMD128-NEXT: i32.add $push23=, $0, $pop22 -; NO-SIMD128-NEXT: i32.extend8_s $push19=, $13 -; NO-SIMD128-NEXT: i32.extend8_s $push18=, $29 -; NO-SIMD128-NEXT: i32.gt_s $push20=, $pop19, $pop18 -; NO-SIMD128-NEXT: i32.select $push21=, $13, $29, $pop20 +; NO-SIMD128-NEXT: i32.extend8_s $push97=, $11 +; NO-SIMD128-NEXT: local.tee $push96=, $32=, $pop97 +; NO-SIMD128-NEXT: i32.extend8_s $push95=, $27 +; NO-SIMD128-NEXT: local.tee $push94=, $16=, $pop95 +; NO-SIMD128-NEXT: i32.gt_s $push20=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push21=, $pop96, $pop94, $pop20 ; NO-SIMD128-NEXT: i32.store8 0($pop23), $pop21 -; NO-SIMD128-NEXT: i32.const $push28=, 11 -; NO-SIMD128-NEXT: i32.add $push29=, $0, $pop28 -; NO-SIMD128-NEXT: i32.extend8_s $push25=, $12 -; NO-SIMD128-NEXT: i32.extend8_s $push24=, $28 -; NO-SIMD128-NEXT: i32.gt_s $push26=, $pop25, $pop24 -; NO-SIMD128-NEXT: i32.select $push27=, $12, $28, $pop26 -; NO-SIMD128-NEXT: i32.store8 0($pop29), $pop27 -; NO-SIMD128-NEXT: i32.const $push34=, 10 -; NO-SIMD128-NEXT: i32.add $push35=, $0, $pop34 -; NO-SIMD128-NEXT: i32.extend8_s $push31=, $11 -; NO-SIMD128-NEXT: i32.extend8_s $push30=, $27 -; NO-SIMD128-NEXT: i32.gt_s $push32=, $pop31, $pop30 -; NO-SIMD128-NEXT: i32.select $push33=, $11, $27, $pop32 -; NO-SIMD128-NEXT: i32.store8 0($pop35), $pop33 -; NO-SIMD128-NEXT: i32.const $push40=, 9 +; NO-SIMD128-NEXT: i32.const $push26=, 9 +; NO-SIMD128-NEXT: i32.add $push27=, $0, $pop26 +; NO-SIMD128-NEXT: i32.extend8_s $push93=, $10 +; NO-SIMD128-NEXT: local.tee $push92=, $32=, $pop93 +; NO-SIMD128-NEXT: i32.extend8_s $push91=, $26 +; NO-SIMD128-NEXT: local.tee $push90=, $16=, $pop91 +; NO-SIMD128-NEXT: i32.gt_s $push24=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push25=, $pop92, $pop90, $pop24 +; NO-SIMD128-NEXT: i32.store8 0($pop27), $pop25 +; NO-SIMD128-NEXT: i32.extend8_s $push89=, $9 +; NO-SIMD128-NEXT: local.tee $push88=, $32=, $pop89 +; NO-SIMD128-NEXT: i32.extend8_s $push87=, $25 +; NO-SIMD128-NEXT: local.tee $push86=, $16=, $pop87 +; NO-SIMD128-NEXT: i32.gt_s $push28=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push29=, $pop88, $pop86, $pop28 +; NO-SIMD128-NEXT: i32.store8 8($0), $pop29 +; NO-SIMD128-NEXT: i32.const $push32=, 7 +; NO-SIMD128-NEXT: i32.add $push33=, $0, $pop32 +; NO-SIMD128-NEXT: i32.extend8_s $push85=, $8 +; NO-SIMD128-NEXT: local.tee $push84=, $32=, $pop85 +; NO-SIMD128-NEXT: i32.extend8_s $push83=, $24 +; NO-SIMD128-NEXT: local.tee $push82=, $16=, $pop83 +; NO-SIMD128-NEXT: i32.gt_s $push30=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push31=, $pop84, $pop82, $pop30 +; NO-SIMD128-NEXT: i32.store8 0($pop33), $pop31 +; NO-SIMD128-NEXT: i32.const $push36=, 6 +; NO-SIMD128-NEXT: i32.add $push37=, $0, $pop36 +; NO-SIMD128-NEXT: i32.extend8_s $push81=, $7 +; NO-SIMD128-NEXT: local.tee $push80=, $32=, $pop81 +; NO-SIMD128-NEXT: i32.extend8_s $push79=, $23 +; NO-SIMD128-NEXT: local.tee $push78=, $16=, $pop79 +; NO-SIMD128-NEXT: i32.gt_s $push34=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push35=, $pop80, $pop78, $pop34 +; NO-SIMD128-NEXT: i32.store8 0($pop37), $pop35 +; NO-SIMD128-NEXT: i32.const $push40=, 5 ; NO-SIMD128-NEXT: i32.add $push41=, $0, $pop40 -; NO-SIMD128-NEXT: i32.extend8_s $push37=, $10 -; NO-SIMD128-NEXT: i32.extend8_s $push36=, $26 -; NO-SIMD128-NEXT: i32.gt_s $push38=, $pop37, $pop36 -; NO-SIMD128-NEXT: i32.select $push39=, $10, $26, $pop38 +; NO-SIMD128-NEXT: i32.extend8_s $push77=, $6 +; NO-SIMD128-NEXT: local.tee $push76=, $32=, $pop77 +; NO-SIMD128-NEXT: i32.extend8_s $push75=, $22 +; NO-SIMD128-NEXT: local.tee $push74=, $16=, $pop75 +; NO-SIMD128-NEXT: i32.gt_s $push38=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push39=, $pop76, $pop74, $pop38 ; NO-SIMD128-NEXT: i32.store8 0($pop41), $pop39 -; NO-SIMD128-NEXT: i32.extend8_s $push43=, $9 -; NO-SIMD128-NEXT: i32.extend8_s $push42=, $25 -; NO-SIMD128-NEXT: i32.gt_s $push44=, $pop43, $pop42 -; NO-SIMD128-NEXT: i32.select $push45=, $9, $25, $pop44 -; NO-SIMD128-NEXT: i32.store8 8($0), $pop45 -; NO-SIMD128-NEXT: i32.const $push50=, 7 -; NO-SIMD128-NEXT: i32.add $push51=, $0, $pop50 -; NO-SIMD128-NEXT: i32.extend8_s $push47=, $8 -; NO-SIMD128-NEXT: i32.extend8_s $push46=, $24 -; NO-SIMD128-NEXT: i32.gt_s $push48=, $pop47, $pop46 -; NO-SIMD128-NEXT: i32.select $push49=, $8, $24, $pop48 -; NO-SIMD128-NEXT: i32.store8 0($pop51), $pop49 -; NO-SIMD128-NEXT: i32.const $push56=, 6 -; NO-SIMD128-NEXT: i32.add $push57=, $0, $pop56 -; NO-SIMD128-NEXT: i32.extend8_s $push53=, $7 -; NO-SIMD128-NEXT: i32.extend8_s $push52=, $23 -; NO-SIMD128-NEXT: i32.gt_s $push54=, $pop53, $pop52 -; NO-SIMD128-NEXT: i32.select $push55=, $7, $23, $pop54 -; NO-SIMD128-NEXT: i32.store8 0($pop57), $pop55 -; NO-SIMD128-NEXT: i32.const $push62=, 5 -; NO-SIMD128-NEXT: i32.add $push63=, $0, $pop62 -; NO-SIMD128-NEXT: i32.extend8_s $push59=, $6 -; NO-SIMD128-NEXT: i32.extend8_s $push58=, $22 -; NO-SIMD128-NEXT: i32.gt_s $push60=, $pop59, $pop58 -; NO-SIMD128-NEXT: i32.select $push61=, $6, $22, $pop60 -; NO-SIMD128-NEXT: i32.store8 0($pop63), $pop61 -; NO-SIMD128-NEXT: i32.extend8_s $push65=, $5 -; NO-SIMD128-NEXT: i32.extend8_s $push64=, $21 -; NO-SIMD128-NEXT: i32.gt_s $push66=, $pop65, $pop64 -; NO-SIMD128-NEXT: i32.select $push67=, $5, $21, $pop66 -; NO-SIMD128-NEXT: i32.store8 4($0), $pop67 -; NO-SIMD128-NEXT: i32.const $push72=, 3 -; NO-SIMD128-NEXT: i32.add $push73=, $0, $pop72 +; NO-SIMD128-NEXT: i32.extend8_s $push73=, $5 +; NO-SIMD128-NEXT: local.tee $push72=, $32=, $pop73 +; NO-SIMD128-NEXT: i32.extend8_s $push71=, $21 +; NO-SIMD128-NEXT: local.tee $push70=, $16=, $pop71 +; NO-SIMD128-NEXT: i32.gt_s $push42=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push43=, $pop72, $pop70, $pop42 +; NO-SIMD128-NEXT: i32.store8 4($0), $pop43 +; NO-SIMD128-NEXT: i32.const $push46=, 3 +; NO-SIMD128-NEXT: i32.add $push47=, $0, $pop46 ; NO-SIMD128-NEXT: i32.extend8_s $push69=, $4 -; NO-SIMD128-NEXT: i32.extend8_s $push68=, $20 -; NO-SIMD128-NEXT: i32.gt_s $push70=, $pop69, $pop68 -; NO-SIMD128-NEXT: i32.select $push71=, $4, $20, $pop70 -; NO-SIMD128-NEXT: i32.store8 0($pop73), $pop71 -; NO-SIMD128-NEXT: i32.extend8_s $push75=, $3 -; NO-SIMD128-NEXT: i32.extend8_s $push74=, $19 -; NO-SIMD128-NEXT: i32.gt_s $push76=, $pop75, $pop74 -; NO-SIMD128-NEXT: i32.select $push77=, $3, $19, $pop76 -; NO-SIMD128-NEXT: i32.store8 2($0), $pop77 -; NO-SIMD128-NEXT: i32.extend8_s $push79=, $2 -; NO-SIMD128-NEXT: i32.extend8_s $push78=, $18 -; NO-SIMD128-NEXT: i32.gt_s $push80=, $pop79, $pop78 -; NO-SIMD128-NEXT: i32.select $push81=, $2, $18, $pop80 -; NO-SIMD128-NEXT: i32.store8 1($0), $pop81 -; NO-SIMD128-NEXT: i32.extend8_s $push83=, $1 -; NO-SIMD128-NEXT: i32.extend8_s $push82=, $17 -; NO-SIMD128-NEXT: i32.gt_s $push84=, $pop83, $pop82 -; NO-SIMD128-NEXT: i32.select $push85=, $1, $17, $pop84 -; NO-SIMD128-NEXT: i32.store8 0($0), $pop85 +; NO-SIMD128-NEXT: local.tee $push68=, $32=, $pop69 +; NO-SIMD128-NEXT: i32.extend8_s $push67=, $20 +; NO-SIMD128-NEXT: local.tee $push66=, $16=, $pop67 +; NO-SIMD128-NEXT: i32.gt_s $push44=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push45=, $pop68, $pop66, $pop44 +; NO-SIMD128-NEXT: i32.store8 0($pop47), $pop45 +; NO-SIMD128-NEXT: i32.extend8_s $push65=, $3 +; NO-SIMD128-NEXT: local.tee $push64=, $32=, $pop65 +; NO-SIMD128-NEXT: i32.extend8_s $push63=, $19 +; NO-SIMD128-NEXT: local.tee $push62=, $16=, $pop63 +; NO-SIMD128-NEXT: i32.gt_s $push48=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push49=, $pop64, $pop62, $pop48 +; NO-SIMD128-NEXT: i32.store8 2($0), $pop49 +; NO-SIMD128-NEXT: i32.extend8_s $push61=, $2 +; NO-SIMD128-NEXT: local.tee $push60=, $32=, $pop61 +; NO-SIMD128-NEXT: i32.extend8_s $push59=, $18 +; NO-SIMD128-NEXT: local.tee $push58=, $16=, $pop59 +; NO-SIMD128-NEXT: i32.gt_s $push50=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push51=, $pop60, $pop58, $pop50 +; NO-SIMD128-NEXT: i32.store8 1($0), $pop51 +; NO-SIMD128-NEXT: i32.extend8_s $push57=, $1 +; NO-SIMD128-NEXT: local.tee $push56=, $32=, $pop57 +; NO-SIMD128-NEXT: i32.extend8_s $push55=, $17 +; NO-SIMD128-NEXT: local.tee $push54=, $16=, $pop55 +; NO-SIMD128-NEXT: i32.gt_s $push52=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push53=, $pop56, $pop54, $pop52 +; NO-SIMD128-NEXT: i32.store8 0($0), $pop53 ; NO-SIMD128-NEXT: return ; ; NO-SIMD128-FAST-LABEL: max_s_v16i8: ; NO-SIMD128-FAST: .functype max_s_v16i8 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> () ; NO-SIMD128-FAST-NEXT: # %bb.0: -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push1=, $1 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push0=, $17 -; NO-SIMD128-FAST-NEXT: i32.gt_s $push2=, $pop1, $pop0 -; NO-SIMD128-FAST-NEXT: i32.select $push3=, $1, $17, $pop2 -; NO-SIMD128-FAST-NEXT: i32.store8 0($0), $pop3 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push5=, $2 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push4=, $18 -; NO-SIMD128-FAST-NEXT: i32.gt_s $push6=, $pop5, $pop4 -; NO-SIMD128-FAST-NEXT: i32.select $push7=, $2, $18, $pop6 -; NO-SIMD128-FAST-NEXT: i32.store8 1($0), $pop7 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push9=, $3 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push8=, $19 -; NO-SIMD128-FAST-NEXT: i32.gt_s $push10=, $pop9, $pop8 -; NO-SIMD128-FAST-NEXT: i32.select $push11=, $3, $19, $pop10 -; NO-SIMD128-FAST-NEXT: i32.store8 2($0), $pop11 -; NO-SIMD128-FAST-NEXT: i32.const $push16=, 3 -; NO-SIMD128-FAST-NEXT: i32.add $push17=, $0, $pop16 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push13=, $4 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push12=, $20 -; NO-SIMD128-FAST-NEXT: i32.gt_s $push14=, $pop13, $pop12 -; NO-SIMD128-FAST-NEXT: i32.select $push15=, $4, $20, $pop14 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop17), $pop15 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push19=, $5 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push18=, $21 -; NO-SIMD128-FAST-NEXT: i32.gt_s $push20=, $pop19, $pop18 -; NO-SIMD128-FAST-NEXT: i32.select $push21=, $5, $21, $pop20 -; NO-SIMD128-FAST-NEXT: i32.store8 4($0), $pop21 -; NO-SIMD128-FAST-NEXT: i32.const $push26=, 5 -; NO-SIMD128-FAST-NEXT: i32.add $push27=, $0, $pop26 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push23=, $6 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push22=, $22 -; NO-SIMD128-FAST-NEXT: i32.gt_s $push24=, $pop23, $pop22 -; NO-SIMD128-FAST-NEXT: i32.select $push25=, $6, $22, $pop24 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop27), $pop25 -; NO-SIMD128-FAST-NEXT: i32.const $push32=, 6 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push117=, $1 +; NO-SIMD128-FAST-NEXT: local.tee $push116=, $1=, $pop117 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push115=, $17 +; NO-SIMD128-FAST-NEXT: local.tee $push114=, $17=, $pop115 +; NO-SIMD128-FAST-NEXT: i32.gt_s $push0=, $1, $17 +; NO-SIMD128-FAST-NEXT: i32.select $push1=, $pop116, $pop114, $pop0 +; NO-SIMD128-FAST-NEXT: i32.store8 0($0), $pop1 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push113=, $2 +; NO-SIMD128-FAST-NEXT: local.tee $push112=, $17=, $pop113 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push111=, $18 +; NO-SIMD128-FAST-NEXT: local.tee $push110=, $18=, $pop111 +; NO-SIMD128-FAST-NEXT: i32.gt_s $push2=, $17, $18 +; NO-SIMD128-FAST-NEXT: i32.select $push3=, $pop112, $pop110, $pop2 +; NO-SIMD128-FAST-NEXT: i32.store8 1($0), $pop3 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push109=, $3 +; NO-SIMD128-FAST-NEXT: local.tee $push108=, $18=, $pop109 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push107=, $19 +; NO-SIMD128-FAST-NEXT: local.tee $push106=, $19=, $pop107 +; NO-SIMD128-FAST-NEXT: i32.gt_s $push4=, $18, $19 +; NO-SIMD128-FAST-NEXT: i32.select $push5=, $pop108, $pop106, $pop4 +; NO-SIMD128-FAST-NEXT: i32.store8 2($0), $pop5 +; NO-SIMD128-FAST-NEXT: i32.const $push8=, 3 +; NO-SIMD128-FAST-NEXT: i32.add $push9=, $0, $pop8 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push105=, $4 +; NO-SIMD128-FAST-NEXT: local.tee $push104=, $19=, $pop105 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push103=, $20 +; NO-SIMD128-FAST-NEXT: local.tee $push102=, $20=, $pop103 +; NO-SIMD128-FAST-NEXT: i32.gt_s $push6=, $19, $20 +; NO-SIMD128-FAST-NEXT: i32.select $push7=, $pop104, $pop102, $pop6 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop9), $pop7 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push101=, $5 +; NO-SIMD128-FAST-NEXT: local.tee $push100=, $20=, $pop101 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push99=, $21 +; NO-SIMD128-FAST-NEXT: local.tee $push98=, $21=, $pop99 +; NO-SIMD128-FAST-NEXT: i32.gt_s $push10=, $20, $21 +; NO-SIMD128-FAST-NEXT: i32.select $push11=, $pop100, $pop98, $pop10 +; NO-SIMD128-FAST-NEXT: i32.store8 4($0), $pop11 +; NO-SIMD128-FAST-NEXT: i32.const $push14=, 5 +; NO-SIMD128-FAST-NEXT: i32.add $push15=, $0, $pop14 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push97=, $6 +; NO-SIMD128-FAST-NEXT: local.tee $push96=, $21=, $pop97 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push95=, $22 +; NO-SIMD128-FAST-NEXT: local.tee $push94=, $22=, $pop95 +; NO-SIMD128-FAST-NEXT: i32.gt_s $push12=, $21, $22 +; NO-SIMD128-FAST-NEXT: i32.select $push13=, $pop96, $pop94, $pop12 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop15), $pop13 +; NO-SIMD128-FAST-NEXT: i32.const $push18=, 6 +; NO-SIMD128-FAST-NEXT: i32.add $push19=, $0, $pop18 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push93=, $7 +; NO-SIMD128-FAST-NEXT: local.tee $push92=, $22=, $pop93 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push91=, $23 +; NO-SIMD128-FAST-NEXT: local.tee $push90=, $23=, $pop91 +; NO-SIMD128-FAST-NEXT: i32.gt_s $push16=, $22, $23 +; NO-SIMD128-FAST-NEXT: i32.select $push17=, $pop92, $pop90, $pop16 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop19), $pop17 +; NO-SIMD128-FAST-NEXT: i32.const $push22=, 7 +; NO-SIMD128-FAST-NEXT: i32.add $push23=, $0, $pop22 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push89=, $8 +; NO-SIMD128-FAST-NEXT: local.tee $push88=, $23=, $pop89 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push87=, $24 +; NO-SIMD128-FAST-NEXT: local.tee $push86=, $24=, $pop87 +; NO-SIMD128-FAST-NEXT: i32.gt_s $push20=, $23, $24 +; NO-SIMD128-FAST-NEXT: i32.select $push21=, $pop88, $pop86, $pop20 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop23), $pop21 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push85=, $9 +; NO-SIMD128-FAST-NEXT: local.tee $push84=, $24=, $pop85 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push83=, $25 +; NO-SIMD128-FAST-NEXT: local.tee $push82=, $25=, $pop83 +; NO-SIMD128-FAST-NEXT: i32.gt_s $push24=, $24, $25 +; NO-SIMD128-FAST-NEXT: i32.select $push25=, $pop84, $pop82, $pop24 +; NO-SIMD128-FAST-NEXT: i32.store8 8($0), $pop25 +; NO-SIMD128-FAST-NEXT: i32.const $push28=, 9 +; NO-SIMD128-FAST-NEXT: i32.add $push29=, $0, $pop28 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push81=, $10 +; NO-SIMD128-FAST-NEXT: local.tee $push80=, $25=, $pop81 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push79=, $26 +; NO-SIMD128-FAST-NEXT: local.tee $push78=, $26=, $pop79 +; NO-SIMD128-FAST-NEXT: i32.gt_s $push26=, $25, $26 +; NO-SIMD128-FAST-NEXT: i32.select $push27=, $pop80, $pop78, $pop26 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop29), $pop27 +; NO-SIMD128-FAST-NEXT: i32.const $push32=, 10 ; NO-SIMD128-FAST-NEXT: i32.add $push33=, $0, $pop32 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push29=, $7 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push28=, $23 -; NO-SIMD128-FAST-NEXT: i32.gt_s $push30=, $pop29, $pop28 -; NO-SIMD128-FAST-NEXT: i32.select $push31=, $7, $23, $pop30 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push77=, $11 +; NO-SIMD128-FAST-NEXT: local.tee $push76=, $26=, $pop77 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push75=, $27 +; NO-SIMD128-FAST-NEXT: local.tee $push74=, $27=, $pop75 +; NO-SIMD128-FAST-NEXT: i32.gt_s $push30=, $26, $27 +; NO-SIMD128-FAST-NEXT: i32.select $push31=, $pop76, $pop74, $pop30 ; NO-SIMD128-FAST-NEXT: i32.store8 0($pop33), $pop31 -; NO-SIMD128-FAST-NEXT: i32.const $push38=, 7 -; NO-SIMD128-FAST-NEXT: i32.add $push39=, $0, $pop38 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push35=, $8 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push34=, $24 -; NO-SIMD128-FAST-NEXT: i32.gt_s $push36=, $pop35, $pop34 -; NO-SIMD128-FAST-NEXT: i32.select $push37=, $8, $24, $pop36 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop39), $pop37 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push41=, $9 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push40=, $25 -; NO-SIMD128-FAST-NEXT: i32.gt_s $push42=, $pop41, $pop40 -; NO-SIMD128-FAST-NEXT: i32.select $push43=, $9, $25, $pop42 -; NO-SIMD128-FAST-NEXT: i32.store8 8($0), $pop43 -; NO-SIMD128-FAST-NEXT: i32.const $push48=, 9 +; NO-SIMD128-FAST-NEXT: i32.const $push36=, 11 +; NO-SIMD128-FAST-NEXT: i32.add $push37=, $0, $pop36 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push73=, $12 +; NO-SIMD128-FAST-NEXT: local.tee $push72=, $27=, $pop73 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push71=, $28 +; NO-SIMD128-FAST-NEXT: local.tee $push70=, $28=, $pop71 +; NO-SIMD128-FAST-NEXT: i32.gt_s $push34=, $27, $28 +; NO-SIMD128-FAST-NEXT: i32.select $push35=, $pop72, $pop70, $pop34 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop37), $pop35 +; NO-SIMD128-FAST-NEXT: i32.const $push40=, 12 +; NO-SIMD128-FAST-NEXT: i32.add $push41=, $0, $pop40 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push69=, $13 +; NO-SIMD128-FAST-NEXT: local.tee $push68=, $28=, $pop69 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push67=, $29 +; NO-SIMD128-FAST-NEXT: local.tee $push66=, $29=, $pop67 +; NO-SIMD128-FAST-NEXT: i32.gt_s $push38=, $28, $29 +; NO-SIMD128-FAST-NEXT: i32.select $push39=, $pop68, $pop66, $pop38 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop41), $pop39 +; NO-SIMD128-FAST-NEXT: i32.const $push44=, 13 +; NO-SIMD128-FAST-NEXT: i32.add $push45=, $0, $pop44 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push65=, $14 +; NO-SIMD128-FAST-NEXT: local.tee $push64=, $29=, $pop65 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push63=, $30 +; NO-SIMD128-FAST-NEXT: local.tee $push62=, $30=, $pop63 +; NO-SIMD128-FAST-NEXT: i32.gt_s $push42=, $29, $30 +; NO-SIMD128-FAST-NEXT: i32.select $push43=, $pop64, $pop62, $pop42 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop45), $pop43 +; NO-SIMD128-FAST-NEXT: i32.const $push48=, 14 ; NO-SIMD128-FAST-NEXT: i32.add $push49=, $0, $pop48 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push45=, $10 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push44=, $26 -; NO-SIMD128-FAST-NEXT: i32.gt_s $push46=, $pop45, $pop44 -; NO-SIMD128-FAST-NEXT: i32.select $push47=, $10, $26, $pop46 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push61=, $15 +; NO-SIMD128-FAST-NEXT: local.tee $push60=, $30=, $pop61 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push59=, $31 +; NO-SIMD128-FAST-NEXT: local.tee $push58=, $31=, $pop59 +; NO-SIMD128-FAST-NEXT: i32.gt_s $push46=, $30, $31 +; NO-SIMD128-FAST-NEXT: i32.select $push47=, $pop60, $pop58, $pop46 ; NO-SIMD128-FAST-NEXT: i32.store8 0($pop49), $pop47 -; NO-SIMD128-FAST-NEXT: i32.const $push54=, 10 -; NO-SIMD128-FAST-NEXT: i32.add $push55=, $0, $pop54 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push51=, $11 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push50=, $27 -; NO-SIMD128-FAST-NEXT: i32.gt_s $push52=, $pop51, $pop50 -; NO-SIMD128-FAST-NEXT: i32.select $push53=, $11, $27, $pop52 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop55), $pop53 -; NO-SIMD128-FAST-NEXT: i32.const $push60=, 11 -; NO-SIMD128-FAST-NEXT: i32.add $push61=, $0, $pop60 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push57=, $12 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push56=, $28 -; NO-SIMD128-FAST-NEXT: i32.gt_s $push58=, $pop57, $pop56 -; NO-SIMD128-FAST-NEXT: i32.select $push59=, $12, $28, $pop58 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop61), $pop59 -; NO-SIMD128-FAST-NEXT: i32.const $push66=, 12 -; NO-SIMD128-FAST-NEXT: i32.add $push67=, $0, $pop66 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push63=, $13 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push62=, $29 -; NO-SIMD128-FAST-NEXT: i32.gt_s $push64=, $pop63, $pop62 -; NO-SIMD128-FAST-NEXT: i32.select $push65=, $13, $29, $pop64 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop67), $pop65 -; NO-SIMD128-FAST-NEXT: i32.const $push72=, 13 -; NO-SIMD128-FAST-NEXT: i32.add $push73=, $0, $pop72 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push69=, $14 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push68=, $30 -; NO-SIMD128-FAST-NEXT: i32.gt_s $push70=, $pop69, $pop68 -; NO-SIMD128-FAST-NEXT: i32.select $push71=, $14, $30, $pop70 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop73), $pop71 -; NO-SIMD128-FAST-NEXT: i32.const $push78=, 14 -; NO-SIMD128-FAST-NEXT: i32.add $push79=, $0, $pop78 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push75=, $15 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push74=, $31 -; NO-SIMD128-FAST-NEXT: i32.gt_s $push76=, $pop75, $pop74 -; NO-SIMD128-FAST-NEXT: i32.select $push77=, $15, $31, $pop76 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop79), $pop77 -; NO-SIMD128-FAST-NEXT: i32.const $push84=, 15 -; NO-SIMD128-FAST-NEXT: i32.add $push85=, $0, $pop84 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push81=, $16 -; NO-SIMD128-FAST-NEXT: i32.extend8_s $push80=, $32 -; NO-SIMD128-FAST-NEXT: i32.gt_s $push82=, $pop81, $pop80 -; NO-SIMD128-FAST-NEXT: i32.select $push83=, $16, $32, $pop82 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop85), $pop83 +; NO-SIMD128-FAST-NEXT: i32.const $push52=, 15 +; NO-SIMD128-FAST-NEXT: i32.add $push53=, $0, $pop52 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push57=, $16 +; NO-SIMD128-FAST-NEXT: local.tee $push56=, $0=, $pop57 +; NO-SIMD128-FAST-NEXT: i32.extend8_s $push55=, $32 +; NO-SIMD128-FAST-NEXT: local.tee $push54=, $32=, $pop55 +; NO-SIMD128-FAST-NEXT: i32.gt_s $push50=, $0, $32 +; NO-SIMD128-FAST-NEXT: i32.select $push51=, $pop56, $pop54, $pop50 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop53), $pop51 ; NO-SIMD128-FAST-NEXT: return %c = icmp sgt <16 x i8> %x, %y %a = select <16 x i1> %c, <16 x i8> %x, <16 x i8> %y @@ -1316,279 +1508,343 @@ ; NO-SIMD128-LABEL: max_u_v16i8: ; NO-SIMD128: .functype max_u_v16i8 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> () ; NO-SIMD128-NEXT: # %bb.0: -; NO-SIMD128-NEXT: i32.const $push5=, 15 -; NO-SIMD128-NEXT: i32.add $push6=, $0, $pop5 +; NO-SIMD128-NEXT: i32.const $push3=, 15 +; NO-SIMD128-NEXT: i32.add $push4=, $0, $pop3 ; NO-SIMD128-NEXT: i32.const $push0=, 255 -; NO-SIMD128-NEXT: i32.and $push2=, $16, $pop0 -; NO-SIMD128-NEXT: i32.const $push117=, 255 -; NO-SIMD128-NEXT: i32.and $push1=, $32, $pop117 -; NO-SIMD128-NEXT: i32.gt_u $push3=, $pop2, $pop1 -; NO-SIMD128-NEXT: i32.select $push4=, $16, $32, $pop3 -; NO-SIMD128-NEXT: i32.store8 0($pop6), $pop4 -; NO-SIMD128-NEXT: i32.const $push11=, 14 +; NO-SIMD128-NEXT: i32.and $push149=, $16, $pop0 +; NO-SIMD128-NEXT: local.tee $push148=, $16=, $pop149 +; NO-SIMD128-NEXT: i32.const $push147=, 255 +; NO-SIMD128-NEXT: i32.and $push146=, $32, $pop147 +; NO-SIMD128-NEXT: local.tee $push145=, $32=, $pop146 +; NO-SIMD128-NEXT: i32.gt_u $push1=, $16, $32 +; NO-SIMD128-NEXT: i32.select $push2=, $pop148, $pop145, $pop1 +; NO-SIMD128-NEXT: i32.store8 0($pop4), $pop2 +; NO-SIMD128-NEXT: i32.const $push7=, 14 +; NO-SIMD128-NEXT: i32.add $push8=, $0, $pop7 +; NO-SIMD128-NEXT: i32.const $push144=, 255 +; NO-SIMD128-NEXT: i32.and $push143=, $15, $pop144 +; NO-SIMD128-NEXT: local.tee $push142=, $32=, $pop143 +; NO-SIMD128-NEXT: i32.const $push141=, 255 +; NO-SIMD128-NEXT: i32.and $push140=, $31, $pop141 +; NO-SIMD128-NEXT: local.tee $push139=, $16=, $pop140 +; NO-SIMD128-NEXT: i32.gt_u $push5=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push6=, $pop142, $pop139, $pop5 +; NO-SIMD128-NEXT: i32.store8 0($pop8), $pop6 +; NO-SIMD128-NEXT: i32.const $push11=, 13 ; NO-SIMD128-NEXT: i32.add $push12=, $0, $pop11 -; NO-SIMD128-NEXT: i32.const $push116=, 255 -; NO-SIMD128-NEXT: i32.and $push8=, $15, $pop116 -; NO-SIMD128-NEXT: i32.const $push115=, 255 -; NO-SIMD128-NEXT: i32.and $push7=, $31, $pop115 -; NO-SIMD128-NEXT: i32.gt_u $push9=, $pop8, $pop7 -; NO-SIMD128-NEXT: i32.select $push10=, $15, $31, $pop9 +; NO-SIMD128-NEXT: i32.const $push138=, 255 +; NO-SIMD128-NEXT: i32.and $push137=, $14, $pop138 +; NO-SIMD128-NEXT: local.tee $push136=, $32=, $pop137 +; NO-SIMD128-NEXT: i32.const $push135=, 255 +; NO-SIMD128-NEXT: i32.and $push134=, $30, $pop135 +; NO-SIMD128-NEXT: local.tee $push133=, $16=, $pop134 +; NO-SIMD128-NEXT: i32.gt_u $push9=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push10=, $pop136, $pop133, $pop9 ; NO-SIMD128-NEXT: i32.store8 0($pop12), $pop10 -; NO-SIMD128-NEXT: i32.const $push17=, 13 -; NO-SIMD128-NEXT: i32.add $push18=, $0, $pop17 -; NO-SIMD128-NEXT: i32.const $push114=, 255 -; NO-SIMD128-NEXT: i32.and $push14=, $14, $pop114 -; NO-SIMD128-NEXT: i32.const $push113=, 255 -; NO-SIMD128-NEXT: i32.and $push13=, $30, $pop113 -; NO-SIMD128-NEXT: i32.gt_u $push15=, $pop14, $pop13 -; NO-SIMD128-NEXT: i32.select $push16=, $14, $30, $pop15 -; NO-SIMD128-NEXT: i32.store8 0($pop18), $pop16 -; NO-SIMD128-NEXT: i32.const $push23=, 12 +; NO-SIMD128-NEXT: i32.const $push15=, 12 +; NO-SIMD128-NEXT: i32.add $push16=, $0, $pop15 +; NO-SIMD128-NEXT: i32.const $push132=, 255 +; NO-SIMD128-NEXT: i32.and $push131=, $13, $pop132 +; NO-SIMD128-NEXT: local.tee $push130=, $32=, $pop131 +; NO-SIMD128-NEXT: i32.const $push129=, 255 +; NO-SIMD128-NEXT: i32.and $push128=, $29, $pop129 +; NO-SIMD128-NEXT: local.tee $push127=, $16=, $pop128 +; NO-SIMD128-NEXT: i32.gt_u $push13=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push14=, $pop130, $pop127, $pop13 +; NO-SIMD128-NEXT: i32.store8 0($pop16), $pop14 +; NO-SIMD128-NEXT: i32.const $push19=, 11 +; NO-SIMD128-NEXT: i32.add $push20=, $0, $pop19 +; NO-SIMD128-NEXT: i32.const $push126=, 255 +; NO-SIMD128-NEXT: i32.and $push125=, $12, $pop126 +; NO-SIMD128-NEXT: local.tee $push124=, $32=, $pop125 +; NO-SIMD128-NEXT: i32.const $push123=, 255 +; NO-SIMD128-NEXT: i32.and $push122=, $28, $pop123 +; NO-SIMD128-NEXT: local.tee $push121=, $16=, $pop122 +; NO-SIMD128-NEXT: i32.gt_u $push17=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push18=, $pop124, $pop121, $pop17 +; NO-SIMD128-NEXT: i32.store8 0($pop20), $pop18 +; NO-SIMD128-NEXT: i32.const $push23=, 10 ; NO-SIMD128-NEXT: i32.add $push24=, $0, $pop23 -; NO-SIMD128-NEXT: i32.const $push112=, 255 -; NO-SIMD128-NEXT: i32.and $push20=, $13, $pop112 -; NO-SIMD128-NEXT: i32.const $push111=, 255 -; NO-SIMD128-NEXT: i32.and $push19=, $29, $pop111 -; NO-SIMD128-NEXT: i32.gt_u $push21=, $pop20, $pop19 -; NO-SIMD128-NEXT: i32.select $push22=, $13, $29, $pop21 +; NO-SIMD128-NEXT: i32.const $push120=, 255 +; NO-SIMD128-NEXT: i32.and $push119=, $11, $pop120 +; NO-SIMD128-NEXT: local.tee $push118=, $32=, $pop119 +; NO-SIMD128-NEXT: i32.const $push117=, 255 +; NO-SIMD128-NEXT: i32.and $push116=, $27, $pop117 +; NO-SIMD128-NEXT: local.tee $push115=, $16=, $pop116 +; NO-SIMD128-NEXT: i32.gt_u $push21=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push22=, $pop118, $pop115, $pop21 ; NO-SIMD128-NEXT: i32.store8 0($pop24), $pop22 -; NO-SIMD128-NEXT: i32.const $push29=, 11 -; NO-SIMD128-NEXT: i32.add $push30=, $0, $pop29 -; NO-SIMD128-NEXT: i32.const $push110=, 255 -; NO-SIMD128-NEXT: i32.and $push26=, $12, $pop110 -; NO-SIMD128-NEXT: i32.const $push109=, 255 -; NO-SIMD128-NEXT: i32.and $push25=, $28, $pop109 -; NO-SIMD128-NEXT: i32.gt_u $push27=, $pop26, $pop25 -; NO-SIMD128-NEXT: i32.select $push28=, $12, $28, $pop27 -; NO-SIMD128-NEXT: i32.store8 0($pop30), $pop28 -; NO-SIMD128-NEXT: i32.const $push35=, 10 -; NO-SIMD128-NEXT: i32.add $push36=, $0, $pop35 +; NO-SIMD128-NEXT: i32.const $push27=, 9 +; NO-SIMD128-NEXT: i32.add $push28=, $0, $pop27 +; NO-SIMD128-NEXT: i32.const $push114=, 255 +; NO-SIMD128-NEXT: i32.and $push113=, $10, $pop114 +; NO-SIMD128-NEXT: local.tee $push112=, $32=, $pop113 +; NO-SIMD128-NEXT: i32.const $push111=, 255 +; NO-SIMD128-NEXT: i32.and $push110=, $26, $pop111 +; NO-SIMD128-NEXT: local.tee $push109=, $16=, $pop110 +; NO-SIMD128-NEXT: i32.gt_u $push25=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push26=, $pop112, $pop109, $pop25 +; NO-SIMD128-NEXT: i32.store8 0($pop28), $pop26 ; NO-SIMD128-NEXT: i32.const $push108=, 255 -; NO-SIMD128-NEXT: i32.and $push32=, $11, $pop108 -; NO-SIMD128-NEXT: i32.const $push107=, 255 -; NO-SIMD128-NEXT: i32.and $push31=, $27, $pop107 -; NO-SIMD128-NEXT: i32.gt_u $push33=, $pop32, $pop31 -; NO-SIMD128-NEXT: i32.select $push34=, $11, $27, $pop33 -; NO-SIMD128-NEXT: i32.store8 0($pop36), $pop34 -; NO-SIMD128-NEXT: i32.const $push41=, 9 -; NO-SIMD128-NEXT: i32.add $push42=, $0, $pop41 -; NO-SIMD128-NEXT: i32.const $push106=, 255 -; NO-SIMD128-NEXT: i32.and $push38=, $10, $pop106 +; NO-SIMD128-NEXT: i32.and $push107=, $9, $pop108 +; NO-SIMD128-NEXT: local.tee $push106=, $32=, $pop107 ; NO-SIMD128-NEXT: i32.const $push105=, 255 -; NO-SIMD128-NEXT: i32.and $push37=, $26, $pop105 -; NO-SIMD128-NEXT: i32.gt_u $push39=, $pop38, $pop37 -; NO-SIMD128-NEXT: i32.select $push40=, $10, $26, $pop39 -; NO-SIMD128-NEXT: i32.store8 0($pop42), $pop40 -; NO-SIMD128-NEXT: i32.const $push104=, 255 -; NO-SIMD128-NEXT: i32.and $push44=, $9, $pop104 -; NO-SIMD128-NEXT: i32.const $push103=, 255 -; NO-SIMD128-NEXT: i32.and $push43=, $25, $pop103 -; NO-SIMD128-NEXT: i32.gt_u $push45=, $pop44, $pop43 -; NO-SIMD128-NEXT: i32.select $push46=, $9, $25, $pop45 -; NO-SIMD128-NEXT: i32.store8 8($0), $pop46 -; NO-SIMD128-NEXT: i32.const $push51=, 7 -; NO-SIMD128-NEXT: i32.add $push52=, $0, $pop51 +; NO-SIMD128-NEXT: i32.and $push104=, $25, $pop105 +; NO-SIMD128-NEXT: local.tee $push103=, $16=, $pop104 +; NO-SIMD128-NEXT: i32.gt_u $push29=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push30=, $pop106, $pop103, $pop29 +; NO-SIMD128-NEXT: i32.store8 8($0), $pop30 +; NO-SIMD128-NEXT: i32.const $push33=, 7 +; NO-SIMD128-NEXT: i32.add $push34=, $0, $pop33 ; NO-SIMD128-NEXT: i32.const $push102=, 255 -; NO-SIMD128-NEXT: i32.and $push48=, $8, $pop102 -; NO-SIMD128-NEXT: i32.const $push101=, 255 -; NO-SIMD128-NEXT: i32.and $push47=, $24, $pop101 -; NO-SIMD128-NEXT: i32.gt_u $push49=, $pop48, $pop47 -; NO-SIMD128-NEXT: i32.select $push50=, $8, $24, $pop49 -; NO-SIMD128-NEXT: i32.store8 0($pop52), $pop50 -; NO-SIMD128-NEXT: i32.const $push57=, 6 -; NO-SIMD128-NEXT: i32.add $push58=, $0, $pop57 -; NO-SIMD128-NEXT: i32.const $push100=, 255 -; NO-SIMD128-NEXT: i32.and $push54=, $7, $pop100 +; NO-SIMD128-NEXT: i32.and $push101=, $8, $pop102 +; NO-SIMD128-NEXT: local.tee $push100=, $32=, $pop101 ; NO-SIMD128-NEXT: i32.const $push99=, 255 -; NO-SIMD128-NEXT: i32.and $push53=, $23, $pop99 -; NO-SIMD128-NEXT: i32.gt_u $push55=, $pop54, $pop53 -; NO-SIMD128-NEXT: i32.select $push56=, $7, $23, $pop55 -; NO-SIMD128-NEXT: i32.store8 0($pop58), $pop56 -; NO-SIMD128-NEXT: i32.const $push63=, 5 -; NO-SIMD128-NEXT: i32.add $push64=, $0, $pop63 -; NO-SIMD128-NEXT: i32.const $push98=, 255 -; NO-SIMD128-NEXT: i32.and $push60=, $6, $pop98 -; NO-SIMD128-NEXT: i32.const $push97=, 255 -; NO-SIMD128-NEXT: i32.and $push59=, $22, $pop97 -; NO-SIMD128-NEXT: i32.gt_u $push61=, $pop60, $pop59 -; NO-SIMD128-NEXT: i32.select $push62=, $6, $22, $pop61 -; NO-SIMD128-NEXT: i32.store8 0($pop64), $pop62 +; NO-SIMD128-NEXT: i32.and $push98=, $24, $pop99 +; NO-SIMD128-NEXT: local.tee $push97=, $16=, $pop98 +; NO-SIMD128-NEXT: i32.gt_u $push31=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push32=, $pop100, $pop97, $pop31 +; NO-SIMD128-NEXT: i32.store8 0($pop34), $pop32 +; NO-SIMD128-NEXT: i32.const $push37=, 6 +; NO-SIMD128-NEXT: i32.add $push38=, $0, $pop37 ; NO-SIMD128-NEXT: i32.const $push96=, 255 -; NO-SIMD128-NEXT: i32.and $push66=, $5, $pop96 -; NO-SIMD128-NEXT: i32.const $push95=, 255 -; NO-SIMD128-NEXT: i32.and $push65=, $21, $pop95 -; NO-SIMD128-NEXT: i32.gt_u $push67=, $pop66, $pop65 -; NO-SIMD128-NEXT: i32.select $push68=, $5, $21, $pop67 -; NO-SIMD128-NEXT: i32.store8 4($0), $pop68 -; NO-SIMD128-NEXT: i32.const $push73=, 3 -; NO-SIMD128-NEXT: i32.add $push74=, $0, $pop73 -; NO-SIMD128-NEXT: i32.const $push94=, 255 -; NO-SIMD128-NEXT: i32.and $push70=, $4, $pop94 -; NO-SIMD128-NEXT: i32.const $push93=, 255 -; NO-SIMD128-NEXT: i32.and $push69=, $20, $pop93 -; NO-SIMD128-NEXT: i32.gt_u $push71=, $pop70, $pop69 -; NO-SIMD128-NEXT: i32.select $push72=, $4, $20, $pop71 -; NO-SIMD128-NEXT: i32.store8 0($pop74), $pop72 -; NO-SIMD128-NEXT: i32.const $push92=, 255 -; NO-SIMD128-NEXT: i32.and $push76=, $3, $pop92 -; NO-SIMD128-NEXT: i32.const $push91=, 255 -; NO-SIMD128-NEXT: i32.and $push75=, $19, $pop91 -; NO-SIMD128-NEXT: i32.gt_u $push77=, $pop76, $pop75 -; NO-SIMD128-NEXT: i32.select $push78=, $3, $19, $pop77 -; NO-SIMD128-NEXT: i32.store8 2($0), $pop78 +; NO-SIMD128-NEXT: i32.and $push95=, $7, $pop96 +; NO-SIMD128-NEXT: local.tee $push94=, $32=, $pop95 +; NO-SIMD128-NEXT: i32.const $push93=, 255 +; NO-SIMD128-NEXT: i32.and $push92=, $23, $pop93 +; NO-SIMD128-NEXT: local.tee $push91=, $16=, $pop92 +; NO-SIMD128-NEXT: i32.gt_u $push35=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push36=, $pop94, $pop91, $pop35 +; NO-SIMD128-NEXT: i32.store8 0($pop38), $pop36 +; NO-SIMD128-NEXT: i32.const $push41=, 5 +; NO-SIMD128-NEXT: i32.add $push42=, $0, $pop41 ; NO-SIMD128-NEXT: i32.const $push90=, 255 -; NO-SIMD128-NEXT: i32.and $push80=, $2, $pop90 -; NO-SIMD128-NEXT: i32.const $push89=, 255 -; NO-SIMD128-NEXT: i32.and $push79=, $18, $pop89 -; NO-SIMD128-NEXT: i32.gt_u $push81=, $pop80, $pop79 -; NO-SIMD128-NEXT: i32.select $push82=, $2, $18, $pop81 -; NO-SIMD128-NEXT: i32.store8 1($0), $pop82 -; NO-SIMD128-NEXT: i32.const $push88=, 255 -; NO-SIMD128-NEXT: i32.and $push84=, $1, $pop88 +; NO-SIMD128-NEXT: i32.and $push89=, $6, $pop90 +; NO-SIMD128-NEXT: local.tee $push88=, $32=, $pop89 ; NO-SIMD128-NEXT: i32.const $push87=, 255 -; NO-SIMD128-NEXT: i32.and $push83=, $17, $pop87 -; NO-SIMD128-NEXT: i32.gt_u $push85=, $pop84, $pop83 -; NO-SIMD128-NEXT: i32.select $push86=, $1, $17, $pop85 -; NO-SIMD128-NEXT: i32.store8 0($0), $pop86 +; NO-SIMD128-NEXT: i32.and $push86=, $22, $pop87 +; NO-SIMD128-NEXT: local.tee $push85=, $16=, $pop86 +; NO-SIMD128-NEXT: i32.gt_u $push39=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push40=, $pop88, $pop85, $pop39 +; NO-SIMD128-NEXT: i32.store8 0($pop42), $pop40 +; NO-SIMD128-NEXT: i32.const $push84=, 255 +; NO-SIMD128-NEXT: i32.and $push83=, $5, $pop84 +; NO-SIMD128-NEXT: local.tee $push82=, $32=, $pop83 +; NO-SIMD128-NEXT: i32.const $push81=, 255 +; NO-SIMD128-NEXT: i32.and $push80=, $21, $pop81 +; NO-SIMD128-NEXT: local.tee $push79=, $16=, $pop80 +; NO-SIMD128-NEXT: i32.gt_u $push43=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push44=, $pop82, $pop79, $pop43 +; NO-SIMD128-NEXT: i32.store8 4($0), $pop44 +; NO-SIMD128-NEXT: i32.const $push47=, 3 +; NO-SIMD128-NEXT: i32.add $push48=, $0, $pop47 +; NO-SIMD128-NEXT: i32.const $push78=, 255 +; NO-SIMD128-NEXT: i32.and $push77=, $4, $pop78 +; NO-SIMD128-NEXT: local.tee $push76=, $32=, $pop77 +; NO-SIMD128-NEXT: i32.const $push75=, 255 +; NO-SIMD128-NEXT: i32.and $push74=, $20, $pop75 +; NO-SIMD128-NEXT: local.tee $push73=, $16=, $pop74 +; NO-SIMD128-NEXT: i32.gt_u $push45=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push46=, $pop76, $pop73, $pop45 +; NO-SIMD128-NEXT: i32.store8 0($pop48), $pop46 +; NO-SIMD128-NEXT: i32.const $push72=, 255 +; NO-SIMD128-NEXT: i32.and $push71=, $3, $pop72 +; NO-SIMD128-NEXT: local.tee $push70=, $32=, $pop71 +; NO-SIMD128-NEXT: i32.const $push69=, 255 +; NO-SIMD128-NEXT: i32.and $push68=, $19, $pop69 +; NO-SIMD128-NEXT: local.tee $push67=, $16=, $pop68 +; NO-SIMD128-NEXT: i32.gt_u $push49=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push50=, $pop70, $pop67, $pop49 +; NO-SIMD128-NEXT: i32.store8 2($0), $pop50 +; NO-SIMD128-NEXT: i32.const $push66=, 255 +; NO-SIMD128-NEXT: i32.and $push65=, $2, $pop66 +; NO-SIMD128-NEXT: local.tee $push64=, $32=, $pop65 +; NO-SIMD128-NEXT: i32.const $push63=, 255 +; NO-SIMD128-NEXT: i32.and $push62=, $18, $pop63 +; NO-SIMD128-NEXT: local.tee $push61=, $16=, $pop62 +; NO-SIMD128-NEXT: i32.gt_u $push51=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push52=, $pop64, $pop61, $pop51 +; NO-SIMD128-NEXT: i32.store8 1($0), $pop52 +; NO-SIMD128-NEXT: i32.const $push60=, 255 +; NO-SIMD128-NEXT: i32.and $push59=, $1, $pop60 +; NO-SIMD128-NEXT: local.tee $push58=, $32=, $pop59 +; NO-SIMD128-NEXT: i32.const $push57=, 255 +; NO-SIMD128-NEXT: i32.and $push56=, $17, $pop57 +; NO-SIMD128-NEXT: local.tee $push55=, $16=, $pop56 +; NO-SIMD128-NEXT: i32.gt_u $push53=, $32, $16 +; NO-SIMD128-NEXT: i32.select $push54=, $pop58, $pop55, $pop53 +; NO-SIMD128-NEXT: i32.store8 0($0), $pop54 ; NO-SIMD128-NEXT: return ; ; NO-SIMD128-FAST-LABEL: max_u_v16i8: ; NO-SIMD128-FAST: .functype max_u_v16i8 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> () ; NO-SIMD128-FAST-NEXT: # %bb.0: ; NO-SIMD128-FAST-NEXT: i32.const $push0=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push2=, $1, $pop0 +; NO-SIMD128-FAST-NEXT: i32.and $push149=, $1, $pop0 +; NO-SIMD128-FAST-NEXT: local.tee $push148=, $1=, $pop149 +; NO-SIMD128-FAST-NEXT: i32.const $push147=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push146=, $17, $pop147 +; NO-SIMD128-FAST-NEXT: local.tee $push145=, $17=, $pop146 +; NO-SIMD128-FAST-NEXT: i32.gt_u $push1=, $1, $17 +; NO-SIMD128-FAST-NEXT: i32.select $push2=, $pop148, $pop145, $pop1 +; NO-SIMD128-FAST-NEXT: i32.store8 0($0), $pop2 +; NO-SIMD128-FAST-NEXT: i32.const $push144=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push143=, $2, $pop144 +; NO-SIMD128-FAST-NEXT: local.tee $push142=, $17=, $pop143 +; NO-SIMD128-FAST-NEXT: i32.const $push141=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push140=, $18, $pop141 +; NO-SIMD128-FAST-NEXT: local.tee $push139=, $18=, $pop140 +; NO-SIMD128-FAST-NEXT: i32.gt_u $push3=, $17, $18 +; NO-SIMD128-FAST-NEXT: i32.select $push4=, $pop142, $pop139, $pop3 +; NO-SIMD128-FAST-NEXT: i32.store8 1($0), $pop4 +; NO-SIMD128-FAST-NEXT: i32.const $push138=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push137=, $3, $pop138 +; NO-SIMD128-FAST-NEXT: local.tee $push136=, $18=, $pop137 +; NO-SIMD128-FAST-NEXT: i32.const $push135=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push134=, $19, $pop135 +; NO-SIMD128-FAST-NEXT: local.tee $push133=, $19=, $pop134 +; NO-SIMD128-FAST-NEXT: i32.gt_u $push5=, $18, $19 +; NO-SIMD128-FAST-NEXT: i32.select $push6=, $pop136, $pop133, $pop5 +; NO-SIMD128-FAST-NEXT: i32.store8 2($0), $pop6 +; NO-SIMD128-FAST-NEXT: i32.const $push9=, 3 +; NO-SIMD128-FAST-NEXT: i32.add $push10=, $0, $pop9 +; NO-SIMD128-FAST-NEXT: i32.const $push132=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push131=, $4, $pop132 +; NO-SIMD128-FAST-NEXT: local.tee $push130=, $19=, $pop131 +; NO-SIMD128-FAST-NEXT: i32.const $push129=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push128=, $20, $pop129 +; NO-SIMD128-FAST-NEXT: local.tee $push127=, $20=, $pop128 +; NO-SIMD128-FAST-NEXT: i32.gt_u $push7=, $19, $20 +; NO-SIMD128-FAST-NEXT: i32.select $push8=, $pop130, $pop127, $pop7 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop10), $pop8 +; NO-SIMD128-FAST-NEXT: i32.const $push126=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push125=, $5, $pop126 +; NO-SIMD128-FAST-NEXT: local.tee $push124=, $20=, $pop125 +; NO-SIMD128-FAST-NEXT: i32.const $push123=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push122=, $21, $pop123 +; NO-SIMD128-FAST-NEXT: local.tee $push121=, $21=, $pop122 +; NO-SIMD128-FAST-NEXT: i32.gt_u $push11=, $20, $21 +; NO-SIMD128-FAST-NEXT: i32.select $push12=, $pop124, $pop121, $pop11 +; NO-SIMD128-FAST-NEXT: i32.store8 4($0), $pop12 +; NO-SIMD128-FAST-NEXT: i32.const $push15=, 5 +; NO-SIMD128-FAST-NEXT: i32.add $push16=, $0, $pop15 +; NO-SIMD128-FAST-NEXT: i32.const $push120=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push119=, $6, $pop120 +; NO-SIMD128-FAST-NEXT: local.tee $push118=, $21=, $pop119 ; NO-SIMD128-FAST-NEXT: i32.const $push117=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push1=, $17, $pop117 -; NO-SIMD128-FAST-NEXT: i32.gt_u $push3=, $pop2, $pop1 -; NO-SIMD128-FAST-NEXT: i32.select $push4=, $1, $17, $pop3 -; NO-SIMD128-FAST-NEXT: i32.store8 0($0), $pop4 -; NO-SIMD128-FAST-NEXT: i32.const $push116=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push6=, $2, $pop116 -; NO-SIMD128-FAST-NEXT: i32.const $push115=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push5=, $18, $pop115 -; NO-SIMD128-FAST-NEXT: i32.gt_u $push7=, $pop6, $pop5 -; NO-SIMD128-FAST-NEXT: i32.select $push8=, $2, $18, $pop7 -; NO-SIMD128-FAST-NEXT: i32.store8 1($0), $pop8 +; NO-SIMD128-FAST-NEXT: i32.and $push116=, $22, $pop117 +; NO-SIMD128-FAST-NEXT: local.tee $push115=, $22=, $pop116 +; NO-SIMD128-FAST-NEXT: i32.gt_u $push13=, $21, $22 +; NO-SIMD128-FAST-NEXT: i32.select $push14=, $pop118, $pop115, $pop13 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop16), $pop14 +; NO-SIMD128-FAST-NEXT: i32.const $push19=, 6 +; NO-SIMD128-FAST-NEXT: i32.add $push20=, $0, $pop19 ; NO-SIMD128-FAST-NEXT: i32.const $push114=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push10=, $3, $pop114 -; NO-SIMD128-FAST-NEXT: i32.const $push113=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push9=, $19, $pop113 -; NO-SIMD128-FAST-NEXT: i32.gt_u $push11=, $pop10, $pop9 -; NO-SIMD128-FAST-NEXT: i32.select $push12=, $3, $19, $pop11 -; NO-SIMD128-FAST-NEXT: i32.store8 2($0), $pop12 -; NO-SIMD128-FAST-NEXT: i32.const $push17=, 3 -; NO-SIMD128-FAST-NEXT: i32.add $push18=, $0, $pop17 -; NO-SIMD128-FAST-NEXT: i32.const $push112=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push14=, $4, $pop112 +; NO-SIMD128-FAST-NEXT: i32.and $push113=, $7, $pop114 +; NO-SIMD128-FAST-NEXT: local.tee $push112=, $22=, $pop113 ; NO-SIMD128-FAST-NEXT: i32.const $push111=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push13=, $20, $pop111 -; NO-SIMD128-FAST-NEXT: i32.gt_u $push15=, $pop14, $pop13 -; NO-SIMD128-FAST-NEXT: i32.select $push16=, $4, $20, $pop15 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop18), $pop16 -; NO-SIMD128-FAST-NEXT: i32.const $push110=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push20=, $5, $pop110 -; NO-SIMD128-FAST-NEXT: i32.const $push109=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push19=, $21, $pop109 -; NO-SIMD128-FAST-NEXT: i32.gt_u $push21=, $pop20, $pop19 -; NO-SIMD128-FAST-NEXT: i32.select $push22=, $5, $21, $pop21 -; NO-SIMD128-FAST-NEXT: i32.store8 4($0), $pop22 -; NO-SIMD128-FAST-NEXT: i32.const $push27=, 5 -; NO-SIMD128-FAST-NEXT: i32.add $push28=, $0, $pop27 +; NO-SIMD128-FAST-NEXT: i32.and $push110=, $23, $pop111 +; NO-SIMD128-FAST-NEXT: local.tee $push109=, $23=, $pop110 +; NO-SIMD128-FAST-NEXT: i32.gt_u $push17=, $22, $23 +; NO-SIMD128-FAST-NEXT: i32.select $push18=, $pop112, $pop109, $pop17 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop20), $pop18 +; NO-SIMD128-FAST-NEXT: i32.const $push23=, 7 +; NO-SIMD128-FAST-NEXT: i32.add $push24=, $0, $pop23 ; NO-SIMD128-FAST-NEXT: i32.const $push108=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push24=, $6, $pop108 -; NO-SIMD128-FAST-NEXT: i32.const $push107=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push23=, $22, $pop107 -; NO-SIMD128-FAST-NEXT: i32.gt_u $push25=, $pop24, $pop23 -; NO-SIMD128-FAST-NEXT: i32.select $push26=, $6, $22, $pop25 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop28), $pop26 -; NO-SIMD128-FAST-NEXT: i32.const $push33=, 6 -; NO-SIMD128-FAST-NEXT: i32.add $push34=, $0, $pop33 -; NO-SIMD128-FAST-NEXT: i32.const $push106=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push30=, $7, $pop106 +; NO-SIMD128-FAST-NEXT: i32.and $push107=, $8, $pop108 +; NO-SIMD128-FAST-NEXT: local.tee $push106=, $23=, $pop107 ; NO-SIMD128-FAST-NEXT: i32.const $push105=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push29=, $23, $pop105 -; NO-SIMD128-FAST-NEXT: i32.gt_u $push31=, $pop30, $pop29 -; NO-SIMD128-FAST-NEXT: i32.select $push32=, $7, $23, $pop31 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop34), $pop32 -; NO-SIMD128-FAST-NEXT: i32.const $push39=, 7 -; NO-SIMD128-FAST-NEXT: i32.add $push40=, $0, $pop39 -; NO-SIMD128-FAST-NEXT: i32.const $push104=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push36=, $8, $pop104 -; NO-SIMD128-FAST-NEXT: i32.const $push103=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push35=, $24, $pop103 -; NO-SIMD128-FAST-NEXT: i32.gt_u $push37=, $pop36, $pop35 -; NO-SIMD128-FAST-NEXT: i32.select $push38=, $8, $24, $pop37 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop40), $pop38 +; NO-SIMD128-FAST-NEXT: i32.and $push104=, $24, $pop105 +; NO-SIMD128-FAST-NEXT: local.tee $push103=, $24=, $pop104 +; NO-SIMD128-FAST-NEXT: i32.gt_u $push21=, $23, $24 +; NO-SIMD128-FAST-NEXT: i32.select $push22=, $pop106, $pop103, $pop21 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop24), $pop22 ; NO-SIMD128-FAST-NEXT: i32.const $push102=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push42=, $9, $pop102 -; NO-SIMD128-FAST-NEXT: i32.const $push101=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push41=, $25, $pop101 -; NO-SIMD128-FAST-NEXT: i32.gt_u $push43=, $pop42, $pop41 -; NO-SIMD128-FAST-NEXT: i32.select $push44=, $9, $25, $pop43 -; NO-SIMD128-FAST-NEXT: i32.store8 8($0), $pop44 -; NO-SIMD128-FAST-NEXT: i32.const $push49=, 9 -; NO-SIMD128-FAST-NEXT: i32.add $push50=, $0, $pop49 -; NO-SIMD128-FAST-NEXT: i32.const $push100=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push46=, $10, $pop100 +; NO-SIMD128-FAST-NEXT: i32.and $push101=, $9, $pop102 +; NO-SIMD128-FAST-NEXT: local.tee $push100=, $24=, $pop101 ; NO-SIMD128-FAST-NEXT: i32.const $push99=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push45=, $26, $pop99 -; NO-SIMD128-FAST-NEXT: i32.gt_u $push47=, $pop46, $pop45 -; NO-SIMD128-FAST-NEXT: i32.select $push48=, $10, $26, $pop47 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop50), $pop48 -; NO-SIMD128-FAST-NEXT: i32.const $push55=, 10 -; NO-SIMD128-FAST-NEXT: i32.add $push56=, $0, $pop55 -; NO-SIMD128-FAST-NEXT: i32.const $push98=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push52=, $11, $pop98 -; NO-SIMD128-FAST-NEXT: i32.const $push97=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push51=, $27, $pop97 -; NO-SIMD128-FAST-NEXT: i32.gt_u $push53=, $pop52, $pop51 -; NO-SIMD128-FAST-NEXT: i32.select $push54=, $11, $27, $pop53 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop56), $pop54 -; NO-SIMD128-FAST-NEXT: i32.const $push61=, 11 -; NO-SIMD128-FAST-NEXT: i32.add $push62=, $0, $pop61 +; NO-SIMD128-FAST-NEXT: i32.and $push98=, $25, $pop99 +; NO-SIMD128-FAST-NEXT: local.tee $push97=, $25=, $pop98 +; NO-SIMD128-FAST-NEXT: i32.gt_u $push25=, $24, $25 +; NO-SIMD128-FAST-NEXT: i32.select $push26=, $pop100, $pop97, $pop25 +; NO-SIMD128-FAST-NEXT: i32.store8 8($0), $pop26 +; NO-SIMD128-FAST-NEXT: i32.const $push29=, 9 +; NO-SIMD128-FAST-NEXT: i32.add $push30=, $0, $pop29 ; NO-SIMD128-FAST-NEXT: i32.const $push96=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push58=, $12, $pop96 -; NO-SIMD128-FAST-NEXT: i32.const $push95=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push57=, $28, $pop95 -; NO-SIMD128-FAST-NEXT: i32.gt_u $push59=, $pop58, $pop57 -; NO-SIMD128-FAST-NEXT: i32.select $push60=, $12, $28, $pop59 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop62), $pop60 -; NO-SIMD128-FAST-NEXT: i32.const $push67=, 12 -; NO-SIMD128-FAST-NEXT: i32.add $push68=, $0, $pop67 -; NO-SIMD128-FAST-NEXT: i32.const $push94=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push64=, $13, $pop94 +; NO-SIMD128-FAST-NEXT: i32.and $push95=, $10, $pop96 +; NO-SIMD128-FAST-NEXT: local.tee $push94=, $25=, $pop95 ; NO-SIMD128-FAST-NEXT: i32.const $push93=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push63=, $29, $pop93 -; NO-SIMD128-FAST-NEXT: i32.gt_u $push65=, $pop64, $pop63 -; NO-SIMD128-FAST-NEXT: i32.select $push66=, $13, $29, $pop65 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop68), $pop66 -; NO-SIMD128-FAST-NEXT: i32.const $push73=, 13 -; NO-SIMD128-FAST-NEXT: i32.add $push74=, $0, $pop73 -; NO-SIMD128-FAST-NEXT: i32.const $push92=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push70=, $14, $pop92 -; NO-SIMD128-FAST-NEXT: i32.const $push91=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push69=, $30, $pop91 -; NO-SIMD128-FAST-NEXT: i32.gt_u $push71=, $pop70, $pop69 -; NO-SIMD128-FAST-NEXT: i32.select $push72=, $14, $30, $pop71 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop74), $pop72 -; NO-SIMD128-FAST-NEXT: i32.const $push79=, 14 -; NO-SIMD128-FAST-NEXT: i32.add $push80=, $0, $pop79 +; NO-SIMD128-FAST-NEXT: i32.and $push92=, $26, $pop93 +; NO-SIMD128-FAST-NEXT: local.tee $push91=, $26=, $pop92 +; NO-SIMD128-FAST-NEXT: i32.gt_u $push27=, $25, $26 +; NO-SIMD128-FAST-NEXT: i32.select $push28=, $pop94, $pop91, $pop27 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop30), $pop28 +; NO-SIMD128-FAST-NEXT: i32.const $push33=, 10 +; NO-SIMD128-FAST-NEXT: i32.add $push34=, $0, $pop33 ; NO-SIMD128-FAST-NEXT: i32.const $push90=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push76=, $15, $pop90 -; NO-SIMD128-FAST-NEXT: i32.const $push89=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push75=, $31, $pop89 -; NO-SIMD128-FAST-NEXT: i32.gt_u $push77=, $pop76, $pop75 -; NO-SIMD128-FAST-NEXT: i32.select $push78=, $15, $31, $pop77 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop80), $pop78 -; NO-SIMD128-FAST-NEXT: i32.const $push85=, 15 -; NO-SIMD128-FAST-NEXT: i32.add $push86=, $0, $pop85 -; NO-SIMD128-FAST-NEXT: i32.const $push88=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push82=, $16, $pop88 +; NO-SIMD128-FAST-NEXT: i32.and $push89=, $11, $pop90 +; NO-SIMD128-FAST-NEXT: local.tee $push88=, $26=, $pop89 ; NO-SIMD128-FAST-NEXT: i32.const $push87=, 255 -; NO-SIMD128-FAST-NEXT: i32.and $push81=, $32, $pop87 -; NO-SIMD128-FAST-NEXT: i32.gt_u $push83=, $pop82, $pop81 -; NO-SIMD128-FAST-NEXT: i32.select $push84=, $16, $32, $pop83 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop86), $pop84 +; NO-SIMD128-FAST-NEXT: i32.and $push86=, $27, $pop87 +; NO-SIMD128-FAST-NEXT: local.tee $push85=, $27=, $pop86 +; NO-SIMD128-FAST-NEXT: i32.gt_u $push31=, $26, $27 +; NO-SIMD128-FAST-NEXT: i32.select $push32=, $pop88, $pop85, $pop31 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop34), $pop32 +; NO-SIMD128-FAST-NEXT: i32.const $push37=, 11 +; NO-SIMD128-FAST-NEXT: i32.add $push38=, $0, $pop37 +; NO-SIMD128-FAST-NEXT: i32.const $push84=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push83=, $12, $pop84 +; NO-SIMD128-FAST-NEXT: local.tee $push82=, $27=, $pop83 +; NO-SIMD128-FAST-NEXT: i32.const $push81=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push80=, $28, $pop81 +; NO-SIMD128-FAST-NEXT: local.tee $push79=, $28=, $pop80 +; NO-SIMD128-FAST-NEXT: i32.gt_u $push35=, $27, $28 +; NO-SIMD128-FAST-NEXT: i32.select $push36=, $pop82, $pop79, $pop35 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop38), $pop36 +; NO-SIMD128-FAST-NEXT: i32.const $push41=, 12 +; NO-SIMD128-FAST-NEXT: i32.add $push42=, $0, $pop41 +; NO-SIMD128-FAST-NEXT: i32.const $push78=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push77=, $13, $pop78 +; NO-SIMD128-FAST-NEXT: local.tee $push76=, $28=, $pop77 +; NO-SIMD128-FAST-NEXT: i32.const $push75=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push74=, $29, $pop75 +; NO-SIMD128-FAST-NEXT: local.tee $push73=, $29=, $pop74 +; NO-SIMD128-FAST-NEXT: i32.gt_u $push39=, $28, $29 +; NO-SIMD128-FAST-NEXT: i32.select $push40=, $pop76, $pop73, $pop39 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop42), $pop40 +; NO-SIMD128-FAST-NEXT: i32.const $push45=, 13 +; NO-SIMD128-FAST-NEXT: i32.add $push46=, $0, $pop45 +; NO-SIMD128-FAST-NEXT: i32.const $push72=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push71=, $14, $pop72 +; NO-SIMD128-FAST-NEXT: local.tee $push70=, $29=, $pop71 +; NO-SIMD128-FAST-NEXT: i32.const $push69=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push68=, $30, $pop69 +; NO-SIMD128-FAST-NEXT: local.tee $push67=, $30=, $pop68 +; NO-SIMD128-FAST-NEXT: i32.gt_u $push43=, $29, $30 +; NO-SIMD128-FAST-NEXT: i32.select $push44=, $pop70, $pop67, $pop43 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop46), $pop44 +; NO-SIMD128-FAST-NEXT: i32.const $push49=, 14 +; NO-SIMD128-FAST-NEXT: i32.add $push50=, $0, $pop49 +; NO-SIMD128-FAST-NEXT: i32.const $push66=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push65=, $15, $pop66 +; NO-SIMD128-FAST-NEXT: local.tee $push64=, $30=, $pop65 +; NO-SIMD128-FAST-NEXT: i32.const $push63=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push62=, $31, $pop63 +; NO-SIMD128-FAST-NEXT: local.tee $push61=, $31=, $pop62 +; NO-SIMD128-FAST-NEXT: i32.gt_u $push47=, $30, $31 +; NO-SIMD128-FAST-NEXT: i32.select $push48=, $pop64, $pop61, $pop47 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop50), $pop48 +; NO-SIMD128-FAST-NEXT: i32.const $push53=, 15 +; NO-SIMD128-FAST-NEXT: i32.add $push54=, $0, $pop53 +; NO-SIMD128-FAST-NEXT: i32.const $push60=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push59=, $16, $pop60 +; NO-SIMD128-FAST-NEXT: local.tee $push58=, $0=, $pop59 +; NO-SIMD128-FAST-NEXT: i32.const $push57=, 255 +; NO-SIMD128-FAST-NEXT: i32.and $push56=, $32, $pop57 +; NO-SIMD128-FAST-NEXT: local.tee $push55=, $32=, $pop56 +; NO-SIMD128-FAST-NEXT: i32.gt_u $push51=, $0, $32 +; NO-SIMD128-FAST-NEXT: i32.select $push52=, $pop58, $pop55, $pop51 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop54), $pop52 ; NO-SIMD128-FAST-NEXT: return %c = icmp ugt <16 x i8> %x, %y %a = select <16 x i1> %c, <16 x i8> %x, <16 x i8> %y @@ -5267,7 +5523,7 @@ ; SIMD128-FAST: .functype andnot_v16i8 (v128, v128) -> (v128) ; SIMD128-FAST-NEXT: # %bb.0: ; SIMD128-FAST-NEXT: v128.not $push0=, $1 -; SIMD128-FAST-NEXT: v128.and $push1=, $0, $pop0 +; SIMD128-FAST-NEXT: v128.and $push1=, $pop0, $0 ; SIMD128-FAST-NEXT: return $pop1 ; ; NO-SIMD128-LABEL: andnot_v16i8: @@ -5275,89 +5531,89 @@ ; NO-SIMD128-NEXT: # %bb.0: ; NO-SIMD128-NEXT: i32.const $push0=, -1 ; NO-SIMD128-NEXT: i32.xor $push1=, $25, $pop0 -; NO-SIMD128-NEXT: i32.and $push2=, $9, $pop1 +; NO-SIMD128-NEXT: i32.and $push2=, $pop1, $9 ; NO-SIMD128-NEXT: i32.store8 8($0), $pop2 ; NO-SIMD128-NEXT: i32.const $push69=, -1 ; NO-SIMD128-NEXT: i32.xor $push3=, $21, $pop69 -; NO-SIMD128-NEXT: i32.and $push4=, $5, $pop3 +; NO-SIMD128-NEXT: i32.and $push4=, $pop3, $5 ; NO-SIMD128-NEXT: i32.store8 4($0), $pop4 ; NO-SIMD128-NEXT: i32.const $push68=, -1 ; NO-SIMD128-NEXT: i32.xor $push5=, $19, $pop68 -; NO-SIMD128-NEXT: i32.and $push6=, $3, $pop5 +; NO-SIMD128-NEXT: i32.and $push6=, $pop5, $3 ; NO-SIMD128-NEXT: i32.store8 2($0), $pop6 ; NO-SIMD128-NEXT: i32.const $push67=, -1 ; NO-SIMD128-NEXT: i32.xor $push7=, $18, $pop67 -; NO-SIMD128-NEXT: i32.and $push8=, $2, $pop7 +; NO-SIMD128-NEXT: i32.and $push8=, $pop7, $2 ; NO-SIMD128-NEXT: i32.store8 1($0), $pop8 ; NO-SIMD128-NEXT: i32.const $push66=, -1 ; NO-SIMD128-NEXT: i32.xor $push9=, $17, $pop66 -; NO-SIMD128-NEXT: i32.and $push10=, $1, $pop9 +; NO-SIMD128-NEXT: i32.and $push10=, $pop9, $1 ; NO-SIMD128-NEXT: i32.store8 0($0), $pop10 ; NO-SIMD128-NEXT: i32.const $push13=, 15 ; NO-SIMD128-NEXT: i32.add $push14=, $0, $pop13 ; NO-SIMD128-NEXT: i32.const $push65=, -1 ; NO-SIMD128-NEXT: i32.xor $push11=, $32, $pop65 -; NO-SIMD128-NEXT: i32.and $push12=, $16, $pop11 +; NO-SIMD128-NEXT: i32.and $push12=, $pop11, $16 ; NO-SIMD128-NEXT: i32.store8 0($pop14), $pop12 ; NO-SIMD128-NEXT: i32.const $push17=, 14 ; NO-SIMD128-NEXT: i32.add $push18=, $0, $pop17 ; NO-SIMD128-NEXT: i32.const $push64=, -1 ; NO-SIMD128-NEXT: i32.xor $push15=, $31, $pop64 -; NO-SIMD128-NEXT: i32.and $push16=, $15, $pop15 +; NO-SIMD128-NEXT: i32.and $push16=, $pop15, $15 ; NO-SIMD128-NEXT: i32.store8 0($pop18), $pop16 ; NO-SIMD128-NEXT: i32.const $push21=, 13 ; NO-SIMD128-NEXT: i32.add $push22=, $0, $pop21 ; NO-SIMD128-NEXT: i32.const $push63=, -1 ; NO-SIMD128-NEXT: i32.xor $push19=, $30, $pop63 -; NO-SIMD128-NEXT: i32.and $push20=, $14, $pop19 +; NO-SIMD128-NEXT: i32.and $push20=, $pop19, $14 ; NO-SIMD128-NEXT: i32.store8 0($pop22), $pop20 ; NO-SIMD128-NEXT: i32.const $push25=, 12 ; NO-SIMD128-NEXT: i32.add $push26=, $0, $pop25 ; NO-SIMD128-NEXT: i32.const $push62=, -1 ; NO-SIMD128-NEXT: i32.xor $push23=, $29, $pop62 -; NO-SIMD128-NEXT: i32.and $push24=, $13, $pop23 +; NO-SIMD128-NEXT: i32.and $push24=, $pop23, $13 ; NO-SIMD128-NEXT: i32.store8 0($pop26), $pop24 ; NO-SIMD128-NEXT: i32.const $push29=, 11 ; NO-SIMD128-NEXT: i32.add $push30=, $0, $pop29 ; NO-SIMD128-NEXT: i32.const $push61=, -1 ; NO-SIMD128-NEXT: i32.xor $push27=, $28, $pop61 -; NO-SIMD128-NEXT: i32.and $push28=, $12, $pop27 +; NO-SIMD128-NEXT: i32.and $push28=, $pop27, $12 ; NO-SIMD128-NEXT: i32.store8 0($pop30), $pop28 ; NO-SIMD128-NEXT: i32.const $push33=, 10 ; NO-SIMD128-NEXT: i32.add $push34=, $0, $pop33 ; NO-SIMD128-NEXT: i32.const $push60=, -1 ; NO-SIMD128-NEXT: i32.xor $push31=, $27, $pop60 -; NO-SIMD128-NEXT: i32.and $push32=, $11, $pop31 +; NO-SIMD128-NEXT: i32.and $push32=, $pop31, $11 ; NO-SIMD128-NEXT: i32.store8 0($pop34), $pop32 ; NO-SIMD128-NEXT: i32.const $push37=, 9 ; NO-SIMD128-NEXT: i32.add $push38=, $0, $pop37 ; NO-SIMD128-NEXT: i32.const $push59=, -1 ; NO-SIMD128-NEXT: i32.xor $push35=, $26, $pop59 -; NO-SIMD128-NEXT: i32.and $push36=, $10, $pop35 +; NO-SIMD128-NEXT: i32.and $push36=, $pop35, $10 ; NO-SIMD128-NEXT: i32.store8 0($pop38), $pop36 ; NO-SIMD128-NEXT: i32.const $push41=, 7 ; NO-SIMD128-NEXT: i32.add $push42=, $0, $pop41 ; NO-SIMD128-NEXT: i32.const $push58=, -1 ; NO-SIMD128-NEXT: i32.xor $push39=, $24, $pop58 -; NO-SIMD128-NEXT: i32.and $push40=, $8, $pop39 +; NO-SIMD128-NEXT: i32.and $push40=, $pop39, $8 ; NO-SIMD128-NEXT: i32.store8 0($pop42), $pop40 ; NO-SIMD128-NEXT: i32.const $push45=, 6 ; NO-SIMD128-NEXT: i32.add $push46=, $0, $pop45 ; NO-SIMD128-NEXT: i32.const $push57=, -1 ; NO-SIMD128-NEXT: i32.xor $push43=, $23, $pop57 -; NO-SIMD128-NEXT: i32.and $push44=, $7, $pop43 +; NO-SIMD128-NEXT: i32.and $push44=, $pop43, $7 ; NO-SIMD128-NEXT: i32.store8 0($pop46), $pop44 ; NO-SIMD128-NEXT: i32.const $push49=, 5 ; NO-SIMD128-NEXT: i32.add $push50=, $0, $pop49 ; NO-SIMD128-NEXT: i32.const $push56=, -1 ; NO-SIMD128-NEXT: i32.xor $push47=, $22, $pop56 -; NO-SIMD128-NEXT: i32.and $push48=, $6, $pop47 +; NO-SIMD128-NEXT: i32.and $push48=, $pop47, $6 ; NO-SIMD128-NEXT: i32.store8 0($pop50), $pop48 ; NO-SIMD128-NEXT: i32.const $push53=, 3 ; NO-SIMD128-NEXT: i32.add $push54=, $0, $pop53 ; NO-SIMD128-NEXT: i32.const $push55=, -1 ; NO-SIMD128-NEXT: i32.xor $push51=, $20, $pop55 -; NO-SIMD128-NEXT: i32.and $push52=, $4, $pop51 +; NO-SIMD128-NEXT: i32.and $push52=, $pop51, $4 ; NO-SIMD128-NEXT: i32.store8 0($pop54), $pop52 ; NO-SIMD128-NEXT: return ; @@ -5366,89 +5622,89 @@ ; NO-SIMD128-FAST-NEXT: # %bb.0: ; NO-SIMD128-FAST-NEXT: i32.const $push0=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push1=, $17, $pop0 -; NO-SIMD128-FAST-NEXT: i32.and $push2=, $1, $pop1 +; NO-SIMD128-FAST-NEXT: i32.and $push2=, $pop1, $1 ; NO-SIMD128-FAST-NEXT: i32.store8 0($0), $pop2 ; NO-SIMD128-FAST-NEXT: i32.const $push69=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push3=, $18, $pop69 -; NO-SIMD128-FAST-NEXT: i32.and $push4=, $2, $pop3 +; NO-SIMD128-FAST-NEXT: i32.and $push4=, $pop3, $2 ; NO-SIMD128-FAST-NEXT: i32.store8 1($0), $pop4 ; NO-SIMD128-FAST-NEXT: i32.const $push68=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push5=, $19, $pop68 -; NO-SIMD128-FAST-NEXT: i32.and $push6=, $3, $pop5 +; NO-SIMD128-FAST-NEXT: i32.and $push6=, $pop5, $3 ; NO-SIMD128-FAST-NEXT: i32.store8 2($0), $pop6 ; NO-SIMD128-FAST-NEXT: i32.const $push7=, 3 ; NO-SIMD128-FAST-NEXT: i32.add $push8=, $0, $pop7 ; NO-SIMD128-FAST-NEXT: i32.const $push67=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push9=, $20, $pop67 -; NO-SIMD128-FAST-NEXT: i32.and $push10=, $4, $pop9 +; NO-SIMD128-FAST-NEXT: i32.and $push10=, $pop9, $4 ; NO-SIMD128-FAST-NEXT: i32.store8 0($pop8), $pop10 ; NO-SIMD128-FAST-NEXT: i32.const $push66=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push11=, $21, $pop66 -; NO-SIMD128-FAST-NEXT: i32.and $push12=, $5, $pop11 +; NO-SIMD128-FAST-NEXT: i32.and $push12=, $pop11, $5 ; NO-SIMD128-FAST-NEXT: i32.store8 4($0), $pop12 ; NO-SIMD128-FAST-NEXT: i32.const $push13=, 5 ; NO-SIMD128-FAST-NEXT: i32.add $push14=, $0, $pop13 ; NO-SIMD128-FAST-NEXT: i32.const $push65=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push15=, $22, $pop65 -; NO-SIMD128-FAST-NEXT: i32.and $push16=, $6, $pop15 +; NO-SIMD128-FAST-NEXT: i32.and $push16=, $pop15, $6 ; NO-SIMD128-FAST-NEXT: i32.store8 0($pop14), $pop16 ; NO-SIMD128-FAST-NEXT: i32.const $push17=, 6 ; NO-SIMD128-FAST-NEXT: i32.add $push18=, $0, $pop17 ; NO-SIMD128-FAST-NEXT: i32.const $push64=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push19=, $23, $pop64 -; NO-SIMD128-FAST-NEXT: i32.and $push20=, $7, $pop19 +; NO-SIMD128-FAST-NEXT: i32.and $push20=, $pop19, $7 ; NO-SIMD128-FAST-NEXT: i32.store8 0($pop18), $pop20 ; NO-SIMD128-FAST-NEXT: i32.const $push21=, 7 ; NO-SIMD128-FAST-NEXT: i32.add $push22=, $0, $pop21 ; NO-SIMD128-FAST-NEXT: i32.const $push63=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push23=, $24, $pop63 -; NO-SIMD128-FAST-NEXT: i32.and $push24=, $8, $pop23 +; NO-SIMD128-FAST-NEXT: i32.and $push24=, $pop23, $8 ; NO-SIMD128-FAST-NEXT: i32.store8 0($pop22), $pop24 ; NO-SIMD128-FAST-NEXT: i32.const $push62=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push25=, $25, $pop62 -; NO-SIMD128-FAST-NEXT: i32.and $push26=, $9, $pop25 +; NO-SIMD128-FAST-NEXT: i32.and $push26=, $pop25, $9 ; NO-SIMD128-FAST-NEXT: i32.store8 8($0), $pop26 ; NO-SIMD128-FAST-NEXT: i32.const $push27=, 9 ; NO-SIMD128-FAST-NEXT: i32.add $push28=, $0, $pop27 ; NO-SIMD128-FAST-NEXT: i32.const $push61=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push29=, $26, $pop61 -; NO-SIMD128-FAST-NEXT: i32.and $push30=, $10, $pop29 +; NO-SIMD128-FAST-NEXT: i32.and $push30=, $pop29, $10 ; NO-SIMD128-FAST-NEXT: i32.store8 0($pop28), $pop30 ; NO-SIMD128-FAST-NEXT: i32.const $push31=, 10 ; NO-SIMD128-FAST-NEXT: i32.add $push32=, $0, $pop31 ; NO-SIMD128-FAST-NEXT: i32.const $push60=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push33=, $27, $pop60 -; NO-SIMD128-FAST-NEXT: i32.and $push34=, $11, $pop33 +; NO-SIMD128-FAST-NEXT: i32.and $push34=, $pop33, $11 ; NO-SIMD128-FAST-NEXT: i32.store8 0($pop32), $pop34 ; NO-SIMD128-FAST-NEXT: i32.const $push35=, 11 ; NO-SIMD128-FAST-NEXT: i32.add $push36=, $0, $pop35 ; NO-SIMD128-FAST-NEXT: i32.const $push59=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push37=, $28, $pop59 -; NO-SIMD128-FAST-NEXT: i32.and $push38=, $12, $pop37 +; NO-SIMD128-FAST-NEXT: i32.and $push38=, $pop37, $12 ; NO-SIMD128-FAST-NEXT: i32.store8 0($pop36), $pop38 ; NO-SIMD128-FAST-NEXT: i32.const $push39=, 12 ; NO-SIMD128-FAST-NEXT: i32.add $push40=, $0, $pop39 ; NO-SIMD128-FAST-NEXT: i32.const $push58=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push41=, $29, $pop58 -; NO-SIMD128-FAST-NEXT: i32.and $push42=, $13, $pop41 +; NO-SIMD128-FAST-NEXT: i32.and $push42=, $pop41, $13 ; NO-SIMD128-FAST-NEXT: i32.store8 0($pop40), $pop42 ; NO-SIMD128-FAST-NEXT: i32.const $push43=, 13 ; NO-SIMD128-FAST-NEXT: i32.add $push44=, $0, $pop43 ; NO-SIMD128-FAST-NEXT: i32.const $push57=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push45=, $30, $pop57 -; NO-SIMD128-FAST-NEXT: i32.and $push46=, $14, $pop45 +; NO-SIMD128-FAST-NEXT: i32.and $push46=, $pop45, $14 ; NO-SIMD128-FAST-NEXT: i32.store8 0($pop44), $pop46 ; NO-SIMD128-FAST-NEXT: i32.const $push47=, 14 ; NO-SIMD128-FAST-NEXT: i32.add $push48=, $0, $pop47 ; NO-SIMD128-FAST-NEXT: i32.const $push56=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push49=, $31, $pop56 -; NO-SIMD128-FAST-NEXT: i32.and $push50=, $15, $pop49 +; NO-SIMD128-FAST-NEXT: i32.and $push50=, $pop49, $15 ; NO-SIMD128-FAST-NEXT: i32.store8 0($pop48), $pop50 ; NO-SIMD128-FAST-NEXT: i32.const $push51=, 15 ; NO-SIMD128-FAST-NEXT: i32.add $push52=, $0, $pop51 ; NO-SIMD128-FAST-NEXT: i32.const $push55=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push53=, $32, $pop55 -; NO-SIMD128-FAST-NEXT: i32.and $push54=, $16, $pop53 +; NO-SIMD128-FAST-NEXT: i32.and $push54=, $pop53, $16 ; NO-SIMD128-FAST-NEXT: i32.store8 0($pop52), $pop54 ; NO-SIMD128-FAST-NEXT: return %inv_y = xor <16 x i8> %y, @@ -5940,256 +6196,191 @@ ; SIMD128-FAST-LABEL: bitselect_xor_reversed_v16i8: ; SIMD128-FAST: .functype bitselect_xor_reversed_v16i8 (v128, v128, v128) -> (v128) ; SIMD128-FAST-NEXT: # %bb.0: -; SIMD128-FAST-NEXT: v128.xor $push1=, $1, $2 -; SIMD128-FAST-NEXT: v128.not $push2=, $0 -; SIMD128-FAST-NEXT: v128.and $push3=, $pop1, $pop2 -; SIMD128-FAST-NEXT: v128.xor $push0=, $pop3, $2 +; SIMD128-FAST-NEXT: v128.xor $push2=, $1, $2 +; SIMD128-FAST-NEXT: v128.and $push1=, $pop2, $0 +; SIMD128-FAST-NEXT: v128.xor $push0=, $pop1, $1 ; SIMD128-FAST-NEXT: return $pop0 ; ; NO-SIMD128-LABEL: bitselect_xor_reversed_v16i8: ; NO-SIMD128: .functype bitselect_xor_reversed_v16i8 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> () ; NO-SIMD128-NEXT: # %bb.0: -; NO-SIMD128-NEXT: i32.const $push5=, 15 -; NO-SIMD128-NEXT: i32.add $push6=, $0, $pop5 -; NO-SIMD128-NEXT: i32.xor $push2=, $32, $48 -; NO-SIMD128-NEXT: i32.const $push0=, -1 -; NO-SIMD128-NEXT: i32.xor $push1=, $16, $pop0 -; NO-SIMD128-NEXT: i32.and $push3=, $pop2, $pop1 -; NO-SIMD128-NEXT: i32.xor $push4=, $pop3, $48 -; NO-SIMD128-NEXT: i32.store8 0($pop6), $pop4 -; NO-SIMD128-NEXT: i32.const $push11=, 14 -; NO-SIMD128-NEXT: i32.add $push12=, $0, $pop11 -; NO-SIMD128-NEXT: i32.xor $push8=, $31, $47 -; NO-SIMD128-NEXT: i32.const $push101=, -1 -; NO-SIMD128-NEXT: i32.xor $push7=, $15, $pop101 -; NO-SIMD128-NEXT: i32.and $push9=, $pop8, $pop7 -; NO-SIMD128-NEXT: i32.xor $push10=, $pop9, $47 -; NO-SIMD128-NEXT: i32.store8 0($pop12), $pop10 -; NO-SIMD128-NEXT: i32.const $push17=, 13 -; NO-SIMD128-NEXT: i32.add $push18=, $0, $pop17 -; NO-SIMD128-NEXT: i32.xor $push14=, $30, $46 -; NO-SIMD128-NEXT: i32.const $push100=, -1 -; NO-SIMD128-NEXT: i32.xor $push13=, $14, $pop100 -; NO-SIMD128-NEXT: i32.and $push15=, $pop14, $pop13 -; NO-SIMD128-NEXT: i32.xor $push16=, $pop15, $46 -; NO-SIMD128-NEXT: i32.store8 0($pop18), $pop16 -; NO-SIMD128-NEXT: i32.const $push23=, 12 +; NO-SIMD128-NEXT: i32.const $push3=, 15 +; NO-SIMD128-NEXT: i32.add $push4=, $0, $pop3 +; NO-SIMD128-NEXT: i32.xor $push0=, $32, $48 +; NO-SIMD128-NEXT: i32.and $push1=, $pop0, $16 +; NO-SIMD128-NEXT: i32.xor $push2=, $pop1, $32 +; NO-SIMD128-NEXT: i32.store8 0($pop4), $pop2 +; NO-SIMD128-NEXT: i32.const $push8=, 14 +; NO-SIMD128-NEXT: i32.add $push9=, $0, $pop8 +; NO-SIMD128-NEXT: i32.xor $push5=, $31, $47 +; NO-SIMD128-NEXT: i32.and $push6=, $pop5, $15 +; NO-SIMD128-NEXT: i32.xor $push7=, $pop6, $31 +; NO-SIMD128-NEXT: i32.store8 0($pop9), $pop7 +; NO-SIMD128-NEXT: i32.const $push13=, 13 +; NO-SIMD128-NEXT: i32.add $push14=, $0, $pop13 +; NO-SIMD128-NEXT: i32.xor $push10=, $30, $46 +; NO-SIMD128-NEXT: i32.and $push11=, $pop10, $14 +; NO-SIMD128-NEXT: i32.xor $push12=, $pop11, $30 +; NO-SIMD128-NEXT: i32.store8 0($pop14), $pop12 +; NO-SIMD128-NEXT: i32.const $push18=, 12 +; NO-SIMD128-NEXT: i32.add $push19=, $0, $pop18 +; NO-SIMD128-NEXT: i32.xor $push15=, $29, $45 +; NO-SIMD128-NEXT: i32.and $push16=, $pop15, $13 +; NO-SIMD128-NEXT: i32.xor $push17=, $pop16, $29 +; NO-SIMD128-NEXT: i32.store8 0($pop19), $pop17 +; NO-SIMD128-NEXT: i32.const $push23=, 11 ; NO-SIMD128-NEXT: i32.add $push24=, $0, $pop23 -; NO-SIMD128-NEXT: i32.xor $push20=, $29, $45 -; NO-SIMD128-NEXT: i32.const $push99=, -1 -; NO-SIMD128-NEXT: i32.xor $push19=, $13, $pop99 -; NO-SIMD128-NEXT: i32.and $push21=, $pop20, $pop19 -; NO-SIMD128-NEXT: i32.xor $push22=, $pop21, $45 +; NO-SIMD128-NEXT: i32.xor $push20=, $28, $44 +; NO-SIMD128-NEXT: i32.and $push21=, $pop20, $12 +; NO-SIMD128-NEXT: i32.xor $push22=, $pop21, $28 ; NO-SIMD128-NEXT: i32.store8 0($pop24), $pop22 -; NO-SIMD128-NEXT: i32.const $push29=, 11 -; NO-SIMD128-NEXT: i32.add $push30=, $0, $pop29 -; NO-SIMD128-NEXT: i32.xor $push26=, $28, $44 -; NO-SIMD128-NEXT: i32.const $push98=, -1 -; NO-SIMD128-NEXT: i32.xor $push25=, $12, $pop98 -; NO-SIMD128-NEXT: i32.and $push27=, $pop26, $pop25 -; NO-SIMD128-NEXT: i32.xor $push28=, $pop27, $44 -; NO-SIMD128-NEXT: i32.store8 0($pop30), $pop28 -; NO-SIMD128-NEXT: i32.const $push35=, 10 -; NO-SIMD128-NEXT: i32.add $push36=, $0, $pop35 -; NO-SIMD128-NEXT: i32.xor $push32=, $27, $43 -; NO-SIMD128-NEXT: i32.const $push97=, -1 -; NO-SIMD128-NEXT: i32.xor $push31=, $11, $pop97 -; NO-SIMD128-NEXT: i32.and $push33=, $pop32, $pop31 -; NO-SIMD128-NEXT: i32.xor $push34=, $pop33, $43 -; NO-SIMD128-NEXT: i32.store8 0($pop36), $pop34 -; NO-SIMD128-NEXT: i32.const $push41=, 9 +; NO-SIMD128-NEXT: i32.const $push28=, 10 +; NO-SIMD128-NEXT: i32.add $push29=, $0, $pop28 +; NO-SIMD128-NEXT: i32.xor $push25=, $27, $43 +; NO-SIMD128-NEXT: i32.and $push26=, $pop25, $11 +; NO-SIMD128-NEXT: i32.xor $push27=, $pop26, $27 +; NO-SIMD128-NEXT: i32.store8 0($pop29), $pop27 +; NO-SIMD128-NEXT: i32.const $push33=, 9 +; NO-SIMD128-NEXT: i32.add $push34=, $0, $pop33 +; NO-SIMD128-NEXT: i32.xor $push30=, $26, $42 +; NO-SIMD128-NEXT: i32.and $push31=, $pop30, $10 +; NO-SIMD128-NEXT: i32.xor $push32=, $pop31, $26 +; NO-SIMD128-NEXT: i32.store8 0($pop34), $pop32 +; NO-SIMD128-NEXT: i32.xor $push35=, $25, $41 +; NO-SIMD128-NEXT: i32.and $push36=, $pop35, $9 +; NO-SIMD128-NEXT: i32.xor $push37=, $pop36, $25 +; NO-SIMD128-NEXT: i32.store8 8($0), $pop37 +; NO-SIMD128-NEXT: i32.const $push41=, 7 ; NO-SIMD128-NEXT: i32.add $push42=, $0, $pop41 -; NO-SIMD128-NEXT: i32.xor $push38=, $26, $42 -; NO-SIMD128-NEXT: i32.const $push96=, -1 -; NO-SIMD128-NEXT: i32.xor $push37=, $10, $pop96 -; NO-SIMD128-NEXT: i32.and $push39=, $pop38, $pop37 -; NO-SIMD128-NEXT: i32.xor $push40=, $pop39, $42 +; NO-SIMD128-NEXT: i32.xor $push38=, $24, $40 +; NO-SIMD128-NEXT: i32.and $push39=, $pop38, $8 +; NO-SIMD128-NEXT: i32.xor $push40=, $pop39, $24 ; NO-SIMD128-NEXT: i32.store8 0($pop42), $pop40 -; NO-SIMD128-NEXT: i32.xor $push44=, $25, $41 -; NO-SIMD128-NEXT: i32.const $push95=, -1 -; NO-SIMD128-NEXT: i32.xor $push43=, $9, $pop95 -; NO-SIMD128-NEXT: i32.and $push45=, $pop44, $pop43 -; NO-SIMD128-NEXT: i32.xor $push46=, $pop45, $41 -; NO-SIMD128-NEXT: i32.store8 8($0), $pop46 -; NO-SIMD128-NEXT: i32.const $push51=, 7 +; NO-SIMD128-NEXT: i32.const $push46=, 6 +; NO-SIMD128-NEXT: i32.add $push47=, $0, $pop46 +; NO-SIMD128-NEXT: i32.xor $push43=, $23, $39 +; NO-SIMD128-NEXT: i32.and $push44=, $pop43, $7 +; NO-SIMD128-NEXT: i32.xor $push45=, $pop44, $23 +; NO-SIMD128-NEXT: i32.store8 0($pop47), $pop45 +; NO-SIMD128-NEXT: i32.const $push51=, 5 ; NO-SIMD128-NEXT: i32.add $push52=, $0, $pop51 -; NO-SIMD128-NEXT: i32.xor $push48=, $24, $40 -; NO-SIMD128-NEXT: i32.const $push94=, -1 -; NO-SIMD128-NEXT: i32.xor $push47=, $8, $pop94 -; NO-SIMD128-NEXT: i32.and $push49=, $pop48, $pop47 -; NO-SIMD128-NEXT: i32.xor $push50=, $pop49, $40 +; NO-SIMD128-NEXT: i32.xor $push48=, $22, $38 +; NO-SIMD128-NEXT: i32.and $push49=, $pop48, $6 +; NO-SIMD128-NEXT: i32.xor $push50=, $pop49, $22 ; NO-SIMD128-NEXT: i32.store8 0($pop52), $pop50 -; NO-SIMD128-NEXT: i32.const $push57=, 6 -; NO-SIMD128-NEXT: i32.add $push58=, $0, $pop57 -; NO-SIMD128-NEXT: i32.xor $push54=, $23, $39 -; NO-SIMD128-NEXT: i32.const $push93=, -1 -; NO-SIMD128-NEXT: i32.xor $push53=, $7, $pop93 -; NO-SIMD128-NEXT: i32.and $push55=, $pop54, $pop53 -; NO-SIMD128-NEXT: i32.xor $push56=, $pop55, $39 -; NO-SIMD128-NEXT: i32.store8 0($pop58), $pop56 -; NO-SIMD128-NEXT: i32.const $push63=, 5 -; NO-SIMD128-NEXT: i32.add $push64=, $0, $pop63 -; NO-SIMD128-NEXT: i32.xor $push60=, $22, $38 -; NO-SIMD128-NEXT: i32.const $push92=, -1 -; NO-SIMD128-NEXT: i32.xor $push59=, $6, $pop92 -; NO-SIMD128-NEXT: i32.and $push61=, $pop60, $pop59 -; NO-SIMD128-NEXT: i32.xor $push62=, $pop61, $38 -; NO-SIMD128-NEXT: i32.store8 0($pop64), $pop62 -; NO-SIMD128-NEXT: i32.xor $push66=, $21, $37 -; NO-SIMD128-NEXT: i32.const $push91=, -1 -; NO-SIMD128-NEXT: i32.xor $push65=, $5, $pop91 -; NO-SIMD128-NEXT: i32.and $push67=, $pop66, $pop65 -; NO-SIMD128-NEXT: i32.xor $push68=, $pop67, $37 -; NO-SIMD128-NEXT: i32.store8 4($0), $pop68 -; NO-SIMD128-NEXT: i32.const $push73=, 3 -; NO-SIMD128-NEXT: i32.add $push74=, $0, $pop73 -; NO-SIMD128-NEXT: i32.xor $push70=, $20, $36 -; NO-SIMD128-NEXT: i32.const $push90=, -1 -; NO-SIMD128-NEXT: i32.xor $push69=, $4, $pop90 -; NO-SIMD128-NEXT: i32.and $push71=, $pop70, $pop69 -; NO-SIMD128-NEXT: i32.xor $push72=, $pop71, $36 -; NO-SIMD128-NEXT: i32.store8 0($pop74), $pop72 -; NO-SIMD128-NEXT: i32.xor $push76=, $19, $35 -; NO-SIMD128-NEXT: i32.const $push89=, -1 -; NO-SIMD128-NEXT: i32.xor $push75=, $3, $pop89 -; NO-SIMD128-NEXT: i32.and $push77=, $pop76, $pop75 -; NO-SIMD128-NEXT: i32.xor $push78=, $pop77, $35 -; NO-SIMD128-NEXT: i32.store8 2($0), $pop78 -; NO-SIMD128-NEXT: i32.xor $push80=, $18, $34 -; NO-SIMD128-NEXT: i32.const $push88=, -1 -; NO-SIMD128-NEXT: i32.xor $push79=, $2, $pop88 -; NO-SIMD128-NEXT: i32.and $push81=, $pop80, $pop79 -; NO-SIMD128-NEXT: i32.xor $push82=, $pop81, $34 -; NO-SIMD128-NEXT: i32.store8 1($0), $pop82 -; NO-SIMD128-NEXT: i32.xor $push84=, $17, $33 -; NO-SIMD128-NEXT: i32.const $push87=, -1 -; NO-SIMD128-NEXT: i32.xor $push83=, $1, $pop87 -; NO-SIMD128-NEXT: i32.and $push85=, $pop84, $pop83 -; NO-SIMD128-NEXT: i32.xor $push86=, $pop85, $33 -; NO-SIMD128-NEXT: i32.store8 0($0), $pop86 +; NO-SIMD128-NEXT: i32.xor $push53=, $21, $37 +; NO-SIMD128-NEXT: i32.and $push54=, $pop53, $5 +; NO-SIMD128-NEXT: i32.xor $push55=, $pop54, $21 +; NO-SIMD128-NEXT: i32.store8 4($0), $pop55 +; NO-SIMD128-NEXT: i32.const $push59=, 3 +; NO-SIMD128-NEXT: i32.add $push60=, $0, $pop59 +; NO-SIMD128-NEXT: i32.xor $push56=, $20, $36 +; NO-SIMD128-NEXT: i32.and $push57=, $pop56, $4 +; NO-SIMD128-NEXT: i32.xor $push58=, $pop57, $20 +; NO-SIMD128-NEXT: i32.store8 0($pop60), $pop58 +; NO-SIMD128-NEXT: i32.xor $push61=, $19, $35 +; NO-SIMD128-NEXT: i32.and $push62=, $pop61, $3 +; NO-SIMD128-NEXT: i32.xor $push63=, $pop62, $19 +; NO-SIMD128-NEXT: i32.store8 2($0), $pop63 +; NO-SIMD128-NEXT: i32.xor $push64=, $18, $34 +; NO-SIMD128-NEXT: i32.and $push65=, $pop64, $2 +; NO-SIMD128-NEXT: i32.xor $push66=, $pop65, $18 +; NO-SIMD128-NEXT: i32.store8 1($0), $pop66 +; NO-SIMD128-NEXT: i32.xor $push67=, $17, $33 +; NO-SIMD128-NEXT: i32.and $push68=, $pop67, $1 +; NO-SIMD128-NEXT: i32.xor $push69=, $pop68, $17 +; NO-SIMD128-NEXT: i32.store8 0($0), $pop69 ; NO-SIMD128-NEXT: return ; ; NO-SIMD128-FAST-LABEL: bitselect_xor_reversed_v16i8: ; NO-SIMD128-FAST: .functype bitselect_xor_reversed_v16i8 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> () ; NO-SIMD128-FAST-NEXT: # %bb.0: -; NO-SIMD128-FAST-NEXT: i32.xor $push2=, $17, $33 -; NO-SIMD128-FAST-NEXT: i32.const $push0=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push1=, $1, $pop0 -; NO-SIMD128-FAST-NEXT: i32.and $push3=, $pop2, $pop1 -; NO-SIMD128-FAST-NEXT: i32.xor $push4=, $pop3, $33 -; NO-SIMD128-FAST-NEXT: i32.store8 0($0), $pop4 -; NO-SIMD128-FAST-NEXT: i32.xor $push6=, $18, $34 -; NO-SIMD128-FAST-NEXT: i32.const $push101=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push5=, $2, $pop101 -; NO-SIMD128-FAST-NEXT: i32.and $push7=, $pop6, $pop5 -; NO-SIMD128-FAST-NEXT: i32.xor $push8=, $pop7, $34 -; NO-SIMD128-FAST-NEXT: i32.store8 1($0), $pop8 -; NO-SIMD128-FAST-NEXT: i32.xor $push10=, $19, $35 -; NO-SIMD128-FAST-NEXT: i32.const $push100=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push9=, $3, $pop100 -; NO-SIMD128-FAST-NEXT: i32.and $push11=, $pop10, $pop9 -; NO-SIMD128-FAST-NEXT: i32.xor $push12=, $pop11, $35 -; NO-SIMD128-FAST-NEXT: i32.store8 2($0), $pop12 -; NO-SIMD128-FAST-NEXT: i32.const $push17=, 3 +; NO-SIMD128-FAST-NEXT: i32.xor $push0=, $17, $33 +; NO-SIMD128-FAST-NEXT: i32.and $push1=, $pop0, $1 +; NO-SIMD128-FAST-NEXT: i32.xor $push2=, $pop1, $17 +; NO-SIMD128-FAST-NEXT: i32.store8 0($0), $pop2 +; NO-SIMD128-FAST-NEXT: i32.xor $push3=, $18, $34 +; NO-SIMD128-FAST-NEXT: i32.and $push4=, $pop3, $2 +; NO-SIMD128-FAST-NEXT: i32.xor $push5=, $pop4, $18 +; NO-SIMD128-FAST-NEXT: i32.store8 1($0), $pop5 +; NO-SIMD128-FAST-NEXT: i32.xor $push6=, $19, $35 +; NO-SIMD128-FAST-NEXT: i32.and $push7=, $pop6, $3 +; NO-SIMD128-FAST-NEXT: i32.xor $push8=, $pop7, $19 +; NO-SIMD128-FAST-NEXT: i32.store8 2($0), $pop8 +; NO-SIMD128-FAST-NEXT: i32.const $push9=, 3 +; NO-SIMD128-FAST-NEXT: i32.add $push10=, $0, $pop9 +; NO-SIMD128-FAST-NEXT: i32.xor $push11=, $20, $36 +; NO-SIMD128-FAST-NEXT: i32.and $push12=, $pop11, $4 +; NO-SIMD128-FAST-NEXT: i32.xor $push13=, $pop12, $20 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop10), $pop13 +; NO-SIMD128-FAST-NEXT: i32.xor $push14=, $21, $37 +; NO-SIMD128-FAST-NEXT: i32.and $push15=, $pop14, $5 +; NO-SIMD128-FAST-NEXT: i32.xor $push16=, $pop15, $21 +; NO-SIMD128-FAST-NEXT: i32.store8 4($0), $pop16 +; NO-SIMD128-FAST-NEXT: i32.const $push17=, 5 ; NO-SIMD128-FAST-NEXT: i32.add $push18=, $0, $pop17 -; NO-SIMD128-FAST-NEXT: i32.xor $push14=, $20, $36 -; NO-SIMD128-FAST-NEXT: i32.const $push99=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push13=, $4, $pop99 -; NO-SIMD128-FAST-NEXT: i32.and $push15=, $pop14, $pop13 -; NO-SIMD128-FAST-NEXT: i32.xor $push16=, $pop15, $36 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop18), $pop16 -; NO-SIMD128-FAST-NEXT: i32.xor $push20=, $21, $37 -; NO-SIMD128-FAST-NEXT: i32.const $push98=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push19=, $5, $pop98 -; NO-SIMD128-FAST-NEXT: i32.and $push21=, $pop20, $pop19 -; NO-SIMD128-FAST-NEXT: i32.xor $push22=, $pop21, $37 -; NO-SIMD128-FAST-NEXT: i32.store8 4($0), $pop22 -; NO-SIMD128-FAST-NEXT: i32.const $push27=, 5 +; NO-SIMD128-FAST-NEXT: i32.xor $push19=, $22, $38 +; NO-SIMD128-FAST-NEXT: i32.and $push20=, $pop19, $6 +; NO-SIMD128-FAST-NEXT: i32.xor $push21=, $pop20, $22 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop18), $pop21 +; NO-SIMD128-FAST-NEXT: i32.const $push22=, 6 +; NO-SIMD128-FAST-NEXT: i32.add $push23=, $0, $pop22 +; NO-SIMD128-FAST-NEXT: i32.xor $push24=, $23, $39 +; NO-SIMD128-FAST-NEXT: i32.and $push25=, $pop24, $7 +; NO-SIMD128-FAST-NEXT: i32.xor $push26=, $pop25, $23 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop23), $pop26 +; NO-SIMD128-FAST-NEXT: i32.const $push27=, 7 ; NO-SIMD128-FAST-NEXT: i32.add $push28=, $0, $pop27 -; NO-SIMD128-FAST-NEXT: i32.xor $push24=, $22, $38 -; NO-SIMD128-FAST-NEXT: i32.const $push97=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push23=, $6, $pop97 -; NO-SIMD128-FAST-NEXT: i32.and $push25=, $pop24, $pop23 -; NO-SIMD128-FAST-NEXT: i32.xor $push26=, $pop25, $38 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop28), $pop26 -; NO-SIMD128-FAST-NEXT: i32.const $push33=, 6 -; NO-SIMD128-FAST-NEXT: i32.add $push34=, $0, $pop33 -; NO-SIMD128-FAST-NEXT: i32.xor $push30=, $23, $39 -; NO-SIMD128-FAST-NEXT: i32.const $push96=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push29=, $7, $pop96 -; NO-SIMD128-FAST-NEXT: i32.and $push31=, $pop30, $pop29 -; NO-SIMD128-FAST-NEXT: i32.xor $push32=, $pop31, $39 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop34), $pop32 -; NO-SIMD128-FAST-NEXT: i32.const $push39=, 7 -; NO-SIMD128-FAST-NEXT: i32.add $push40=, $0, $pop39 -; NO-SIMD128-FAST-NEXT: i32.xor $push36=, $24, $40 -; NO-SIMD128-FAST-NEXT: i32.const $push95=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push35=, $8, $pop95 -; NO-SIMD128-FAST-NEXT: i32.and $push37=, $pop36, $pop35 -; NO-SIMD128-FAST-NEXT: i32.xor $push38=, $pop37, $40 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop40), $pop38 -; NO-SIMD128-FAST-NEXT: i32.xor $push42=, $25, $41 -; NO-SIMD128-FAST-NEXT: i32.const $push94=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push41=, $9, $pop94 -; NO-SIMD128-FAST-NEXT: i32.and $push43=, $pop42, $pop41 -; NO-SIMD128-FAST-NEXT: i32.xor $push44=, $pop43, $41 -; NO-SIMD128-FAST-NEXT: i32.store8 8($0), $pop44 -; NO-SIMD128-FAST-NEXT: i32.const $push49=, 9 -; NO-SIMD128-FAST-NEXT: i32.add $push50=, $0, $pop49 -; NO-SIMD128-FAST-NEXT: i32.xor $push46=, $26, $42 -; NO-SIMD128-FAST-NEXT: i32.const $push93=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push45=, $10, $pop93 -; NO-SIMD128-FAST-NEXT: i32.and $push47=, $pop46, $pop45 -; NO-SIMD128-FAST-NEXT: i32.xor $push48=, $pop47, $42 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop50), $pop48 -; NO-SIMD128-FAST-NEXT: i32.const $push55=, 10 +; NO-SIMD128-FAST-NEXT: i32.xor $push29=, $24, $40 +; NO-SIMD128-FAST-NEXT: i32.and $push30=, $pop29, $8 +; NO-SIMD128-FAST-NEXT: i32.xor $push31=, $pop30, $24 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop28), $pop31 +; NO-SIMD128-FAST-NEXT: i32.xor $push32=, $25, $41 +; NO-SIMD128-FAST-NEXT: i32.and $push33=, $pop32, $9 +; NO-SIMD128-FAST-NEXT: i32.xor $push34=, $pop33, $25 +; NO-SIMD128-FAST-NEXT: i32.store8 8($0), $pop34 +; NO-SIMD128-FAST-NEXT: i32.const $push35=, 9 +; NO-SIMD128-FAST-NEXT: i32.add $push36=, $0, $pop35 +; NO-SIMD128-FAST-NEXT: i32.xor $push37=, $26, $42 +; NO-SIMD128-FAST-NEXT: i32.and $push38=, $pop37, $10 +; NO-SIMD128-FAST-NEXT: i32.xor $push39=, $pop38, $26 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop36), $pop39 +; NO-SIMD128-FAST-NEXT: i32.const $push40=, 10 +; NO-SIMD128-FAST-NEXT: i32.add $push41=, $0, $pop40 +; NO-SIMD128-FAST-NEXT: i32.xor $push42=, $27, $43 +; NO-SIMD128-FAST-NEXT: i32.and $push43=, $pop42, $11 +; NO-SIMD128-FAST-NEXT: i32.xor $push44=, $pop43, $27 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop41), $pop44 +; NO-SIMD128-FAST-NEXT: i32.const $push45=, 11 +; NO-SIMD128-FAST-NEXT: i32.add $push46=, $0, $pop45 +; NO-SIMD128-FAST-NEXT: i32.xor $push47=, $28, $44 +; NO-SIMD128-FAST-NEXT: i32.and $push48=, $pop47, $12 +; NO-SIMD128-FAST-NEXT: i32.xor $push49=, $pop48, $28 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop46), $pop49 +; NO-SIMD128-FAST-NEXT: i32.const $push50=, 12 +; NO-SIMD128-FAST-NEXT: i32.add $push51=, $0, $pop50 +; NO-SIMD128-FAST-NEXT: i32.xor $push52=, $29, $45 +; NO-SIMD128-FAST-NEXT: i32.and $push53=, $pop52, $13 +; NO-SIMD128-FAST-NEXT: i32.xor $push54=, $pop53, $29 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop51), $pop54 +; NO-SIMD128-FAST-NEXT: i32.const $push55=, 13 ; NO-SIMD128-FAST-NEXT: i32.add $push56=, $0, $pop55 -; NO-SIMD128-FAST-NEXT: i32.xor $push52=, $27, $43 -; NO-SIMD128-FAST-NEXT: i32.const $push92=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push51=, $11, $pop92 -; NO-SIMD128-FAST-NEXT: i32.and $push53=, $pop52, $pop51 -; NO-SIMD128-FAST-NEXT: i32.xor $push54=, $pop53, $43 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop56), $pop54 -; NO-SIMD128-FAST-NEXT: i32.const $push61=, 11 -; NO-SIMD128-FAST-NEXT: i32.add $push62=, $0, $pop61 -; NO-SIMD128-FAST-NEXT: i32.xor $push58=, $28, $44 -; NO-SIMD128-FAST-NEXT: i32.const $push91=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push57=, $12, $pop91 -; NO-SIMD128-FAST-NEXT: i32.and $push59=, $pop58, $pop57 -; NO-SIMD128-FAST-NEXT: i32.xor $push60=, $pop59, $44 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop62), $pop60 -; NO-SIMD128-FAST-NEXT: i32.const $push67=, 12 -; NO-SIMD128-FAST-NEXT: i32.add $push68=, $0, $pop67 -; NO-SIMD128-FAST-NEXT: i32.xor $push64=, $29, $45 -; NO-SIMD128-FAST-NEXT: i32.const $push90=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push63=, $13, $pop90 -; NO-SIMD128-FAST-NEXT: i32.and $push65=, $pop64, $pop63 -; NO-SIMD128-FAST-NEXT: i32.xor $push66=, $pop65, $45 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop68), $pop66 -; NO-SIMD128-FAST-NEXT: i32.const $push73=, 13 -; NO-SIMD128-FAST-NEXT: i32.add $push74=, $0, $pop73 -; NO-SIMD128-FAST-NEXT: i32.xor $push70=, $30, $46 -; NO-SIMD128-FAST-NEXT: i32.const $push89=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push69=, $14, $pop89 -; NO-SIMD128-FAST-NEXT: i32.and $push71=, $pop70, $pop69 -; NO-SIMD128-FAST-NEXT: i32.xor $push72=, $pop71, $46 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop74), $pop72 -; NO-SIMD128-FAST-NEXT: i32.const $push79=, 14 -; NO-SIMD128-FAST-NEXT: i32.add $push80=, $0, $pop79 -; NO-SIMD128-FAST-NEXT: i32.xor $push76=, $31, $47 -; NO-SIMD128-FAST-NEXT: i32.const $push88=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push75=, $15, $pop88 -; NO-SIMD128-FAST-NEXT: i32.and $push77=, $pop76, $pop75 -; NO-SIMD128-FAST-NEXT: i32.xor $push78=, $pop77, $47 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop80), $pop78 -; NO-SIMD128-FAST-NEXT: i32.const $push85=, 15 -; NO-SIMD128-FAST-NEXT: i32.add $push86=, $0, $pop85 -; NO-SIMD128-FAST-NEXT: i32.xor $push82=, $32, $48 -; NO-SIMD128-FAST-NEXT: i32.const $push87=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push81=, $16, $pop87 -; NO-SIMD128-FAST-NEXT: i32.and $push83=, $pop82, $pop81 -; NO-SIMD128-FAST-NEXT: i32.xor $push84=, $pop83, $48 -; NO-SIMD128-FAST-NEXT: i32.store8 0($pop86), $pop84 +; NO-SIMD128-FAST-NEXT: i32.xor $push57=, $30, $46 +; NO-SIMD128-FAST-NEXT: i32.and $push58=, $pop57, $14 +; NO-SIMD128-FAST-NEXT: i32.xor $push59=, $pop58, $30 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop56), $pop59 +; NO-SIMD128-FAST-NEXT: i32.const $push60=, 14 +; NO-SIMD128-FAST-NEXT: i32.add $push61=, $0, $pop60 +; NO-SIMD128-FAST-NEXT: i32.xor $push62=, $31, $47 +; NO-SIMD128-FAST-NEXT: i32.and $push63=, $pop62, $15 +; NO-SIMD128-FAST-NEXT: i32.xor $push64=, $pop63, $31 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop61), $pop64 +; NO-SIMD128-FAST-NEXT: i32.const $push65=, 15 +; NO-SIMD128-FAST-NEXT: i32.add $push66=, $0, $pop65 +; NO-SIMD128-FAST-NEXT: i32.xor $push67=, $32, $48 +; NO-SIMD128-FAST-NEXT: i32.and $push68=, $pop67, $16 +; NO-SIMD128-FAST-NEXT: i32.xor $push69=, $pop68, $32 +; NO-SIMD128-FAST-NEXT: i32.store8 0($pop66), $pop69 ; NO-SIMD128-FAST-NEXT: return %xor1 = xor <16 x i8> %v1, %v2 %notc = xor <16 x i8> %c, () ; NO-SIMD128-NEXT: # %bb.0: -; NO-SIMD128-NEXT: i32.const $push4=, 14 -; NO-SIMD128-NEXT: i32.add $push5=, $0, $pop4 -; NO-SIMD128-NEXT: i32.extend16_s $push1=, $8 -; NO-SIMD128-NEXT: i32.extend16_s $push0=, $16 -; NO-SIMD128-NEXT: i32.lt_s $push2=, $pop1, $pop0 -; NO-SIMD128-NEXT: i32.select $push3=, $8, $16, $pop2 -; NO-SIMD128-NEXT: i32.store16 0($pop5), $pop3 -; NO-SIMD128-NEXT: i32.const $push10=, 12 +; NO-SIMD128-NEXT: i32.const $push2=, 14 +; NO-SIMD128-NEXT: i32.add $push3=, $0, $pop2 +; NO-SIMD128-NEXT: i32.extend16_s $push55=, $8 +; NO-SIMD128-NEXT: local.tee $push54=, $8=, $pop55 +; NO-SIMD128-NEXT: i32.extend16_s $push53=, $16 +; NO-SIMD128-NEXT: local.tee $push52=, $16=, $pop53 +; NO-SIMD128-NEXT: i32.lt_s $push0=, $8, $16 +; NO-SIMD128-NEXT: i32.select $push1=, $pop54, $pop52, $pop0 +; NO-SIMD128-NEXT: i32.store16 0($pop3), $pop1 +; NO-SIMD128-NEXT: i32.const $push6=, 12 +; NO-SIMD128-NEXT: i32.add $push7=, $0, $pop6 +; NO-SIMD128-NEXT: i32.extend16_s $push51=, $7 +; NO-SIMD128-NEXT: local.tee $push50=, $16=, $pop51 +; NO-SIMD128-NEXT: i32.extend16_s $push49=, $15 +; NO-SIMD128-NEXT: local.tee $push48=, $8=, $pop49 +; NO-SIMD128-NEXT: i32.lt_s $push4=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push5=, $pop50, $pop48, $pop4 +; NO-SIMD128-NEXT: i32.store16 0($pop7), $pop5 +; NO-SIMD128-NEXT: i32.const $push10=, 10 ; NO-SIMD128-NEXT: i32.add $push11=, $0, $pop10 -; NO-SIMD128-NEXT: i32.extend16_s $push7=, $7 -; NO-SIMD128-NEXT: i32.extend16_s $push6=, $15 -; NO-SIMD128-NEXT: i32.lt_s $push8=, $pop7, $pop6 -; NO-SIMD128-NEXT: i32.select $push9=, $7, $15, $pop8 +; NO-SIMD128-NEXT: i32.extend16_s $push47=, $6 +; NO-SIMD128-NEXT: local.tee $push46=, $16=, $pop47 +; NO-SIMD128-NEXT: i32.extend16_s $push45=, $14 +; NO-SIMD128-NEXT: local.tee $push44=, $8=, $pop45 +; NO-SIMD128-NEXT: i32.lt_s $push8=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push9=, $pop46, $pop44, $pop8 ; NO-SIMD128-NEXT: i32.store16 0($pop11), $pop9 -; NO-SIMD128-NEXT: i32.const $push16=, 10 +; NO-SIMD128-NEXT: i32.extend16_s $push43=, $5 +; NO-SIMD128-NEXT: local.tee $push42=, $16=, $pop43 +; NO-SIMD128-NEXT: i32.extend16_s $push41=, $13 +; NO-SIMD128-NEXT: local.tee $push40=, $8=, $pop41 +; NO-SIMD128-NEXT: i32.lt_s $push12=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push13=, $pop42, $pop40, $pop12 +; NO-SIMD128-NEXT: i32.store16 8($0), $pop13 +; NO-SIMD128-NEXT: i32.const $push16=, 6 ; NO-SIMD128-NEXT: i32.add $push17=, $0, $pop16 -; NO-SIMD128-NEXT: i32.extend16_s $push13=, $6 -; NO-SIMD128-NEXT: i32.extend16_s $push12=, $14 -; NO-SIMD128-NEXT: i32.lt_s $push14=, $pop13, $pop12 -; NO-SIMD128-NEXT: i32.select $push15=, $6, $14, $pop14 +; NO-SIMD128-NEXT: i32.extend16_s $push39=, $4 +; NO-SIMD128-NEXT: local.tee $push38=, $16=, $pop39 +; NO-SIMD128-NEXT: i32.extend16_s $push37=, $12 +; NO-SIMD128-NEXT: local.tee $push36=, $8=, $pop37 +; NO-SIMD128-NEXT: i32.lt_s $push14=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push15=, $pop38, $pop36, $pop14 ; NO-SIMD128-NEXT: i32.store16 0($pop17), $pop15 -; NO-SIMD128-NEXT: i32.extend16_s $push19=, $5 -; NO-SIMD128-NEXT: i32.extend16_s $push18=, $13 -; NO-SIMD128-NEXT: i32.lt_s $push20=, $pop19, $pop18 -; NO-SIMD128-NEXT: i32.select $push21=, $5, $13, $pop20 -; NO-SIMD128-NEXT: i32.store16 8($0), $pop21 -; NO-SIMD128-NEXT: i32.const $push26=, 6 -; NO-SIMD128-NEXT: i32.add $push27=, $0, $pop26 -; NO-SIMD128-NEXT: i32.extend16_s $push23=, $4 -; NO-SIMD128-NEXT: i32.extend16_s $push22=, $12 -; NO-SIMD128-NEXT: i32.lt_s $push24=, $pop23, $pop22 -; NO-SIMD128-NEXT: i32.select $push25=, $4, $12, $pop24 -; NO-SIMD128-NEXT: i32.store16 0($pop27), $pop25 -; NO-SIMD128-NEXT: i32.extend16_s $push29=, $3 -; NO-SIMD128-NEXT: i32.extend16_s $push28=, $11 -; NO-SIMD128-NEXT: i32.lt_s $push30=, $pop29, $pop28 -; NO-SIMD128-NEXT: i32.select $push31=, $3, $11, $pop30 -; NO-SIMD128-NEXT: i32.store16 4($0), $pop31 -; NO-SIMD128-NEXT: i32.extend16_s $push33=, $2 -; NO-SIMD128-NEXT: i32.extend16_s $push32=, $10 -; NO-SIMD128-NEXT: i32.lt_s $push34=, $pop33, $pop32 -; NO-SIMD128-NEXT: i32.select $push35=, $2, $10, $pop34 -; NO-SIMD128-NEXT: i32.store16 2($0), $pop35 -; NO-SIMD128-NEXT: i32.extend16_s $push37=, $1 -; NO-SIMD128-NEXT: i32.extend16_s $push36=, $9 -; NO-SIMD128-NEXT: i32.lt_s $push38=, $pop37, $pop36 -; NO-SIMD128-NEXT: i32.select $push39=, $1, $9, $pop38 -; NO-SIMD128-NEXT: i32.store16 0($0), $pop39 +; NO-SIMD128-NEXT: i32.extend16_s $push35=, $3 +; NO-SIMD128-NEXT: local.tee $push34=, $16=, $pop35 +; NO-SIMD128-NEXT: i32.extend16_s $push33=, $11 +; NO-SIMD128-NEXT: local.tee $push32=, $8=, $pop33 +; NO-SIMD128-NEXT: i32.lt_s $push18=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push19=, $pop34, $pop32, $pop18 +; NO-SIMD128-NEXT: i32.store16 4($0), $pop19 +; NO-SIMD128-NEXT: i32.extend16_s $push31=, $2 +; NO-SIMD128-NEXT: local.tee $push30=, $16=, $pop31 +; NO-SIMD128-NEXT: i32.extend16_s $push29=, $10 +; NO-SIMD128-NEXT: local.tee $push28=, $8=, $pop29 +; NO-SIMD128-NEXT: i32.lt_s $push20=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push21=, $pop30, $pop28, $pop20 +; NO-SIMD128-NEXT: i32.store16 2($0), $pop21 +; NO-SIMD128-NEXT: i32.extend16_s $push27=, $1 +; NO-SIMD128-NEXT: local.tee $push26=, $16=, $pop27 +; NO-SIMD128-NEXT: i32.extend16_s $push25=, $9 +; NO-SIMD128-NEXT: local.tee $push24=, $8=, $pop25 +; NO-SIMD128-NEXT: i32.lt_s $push22=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push23=, $pop26, $pop24, $pop22 +; NO-SIMD128-NEXT: i32.store16 0($0), $pop23 ; NO-SIMD128-NEXT: return ; ; NO-SIMD128-FAST-LABEL: min_s_v8i16: ; NO-SIMD128-FAST: .functype min_s_v8i16 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> () ; NO-SIMD128-FAST-NEXT: # %bb.0: -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push1=, $1 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push0=, $9 -; NO-SIMD128-FAST-NEXT: i32.lt_s $push2=, $pop1, $pop0 -; NO-SIMD128-FAST-NEXT: i32.select $push3=, $1, $9, $pop2 -; NO-SIMD128-FAST-NEXT: i32.store16 0($0), $pop3 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push5=, $2 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push4=, $10 -; NO-SIMD128-FAST-NEXT: i32.lt_s $push6=, $pop5, $pop4 -; NO-SIMD128-FAST-NEXT: i32.select $push7=, $2, $10, $pop6 -; NO-SIMD128-FAST-NEXT: i32.store16 2($0), $pop7 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push9=, $3 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push8=, $11 -; NO-SIMD128-FAST-NEXT: i32.lt_s $push10=, $pop9, $pop8 -; NO-SIMD128-FAST-NEXT: i32.select $push11=, $3, $11, $pop10 -; NO-SIMD128-FAST-NEXT: i32.store16 4($0), $pop11 -; NO-SIMD128-FAST-NEXT: i32.const $push16=, 6 -; NO-SIMD128-FAST-NEXT: i32.add $push17=, $0, $pop16 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push13=, $4 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push12=, $12 -; NO-SIMD128-FAST-NEXT: i32.lt_s $push14=, $pop13, $pop12 -; NO-SIMD128-FAST-NEXT: i32.select $push15=, $4, $12, $pop14 -; NO-SIMD128-FAST-NEXT: i32.store16 0($pop17), $pop15 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push19=, $5 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push18=, $13 -; NO-SIMD128-FAST-NEXT: i32.lt_s $push20=, $pop19, $pop18 -; NO-SIMD128-FAST-NEXT: i32.select $push21=, $5, $13, $pop20 -; NO-SIMD128-FAST-NEXT: i32.store16 8($0), $pop21 -; NO-SIMD128-FAST-NEXT: i32.const $push26=, 10 -; NO-SIMD128-FAST-NEXT: i32.add $push27=, $0, $pop26 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push23=, $6 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push22=, $14 -; NO-SIMD128-FAST-NEXT: i32.lt_s $push24=, $pop23, $pop22 -; NO-SIMD128-FAST-NEXT: i32.select $push25=, $6, $14, $pop24 -; NO-SIMD128-FAST-NEXT: i32.store16 0($pop27), $pop25 -; NO-SIMD128-FAST-NEXT: i32.const $push32=, 12 -; NO-SIMD128-FAST-NEXT: i32.add $push33=, $0, $pop32 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push29=, $7 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push28=, $15 -; NO-SIMD128-FAST-NEXT: i32.lt_s $push30=, $pop29, $pop28 -; NO-SIMD128-FAST-NEXT: i32.select $push31=, $7, $15, $pop30 -; NO-SIMD128-FAST-NEXT: i32.store16 0($pop33), $pop31 -; NO-SIMD128-FAST-NEXT: i32.const $push38=, 14 -; NO-SIMD128-FAST-NEXT: i32.add $push39=, $0, $pop38 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push35=, $8 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push34=, $16 -; NO-SIMD128-FAST-NEXT: i32.lt_s $push36=, $pop35, $pop34 -; NO-SIMD128-FAST-NEXT: i32.select $push37=, $8, $16, $pop36 -; NO-SIMD128-FAST-NEXT: i32.store16 0($pop39), $pop37 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push55=, $1 +; NO-SIMD128-FAST-NEXT: local.tee $push54=, $1=, $pop55 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push53=, $9 +; NO-SIMD128-FAST-NEXT: local.tee $push52=, $9=, $pop53 +; NO-SIMD128-FAST-NEXT: i32.lt_s $push0=, $1, $9 +; NO-SIMD128-FAST-NEXT: i32.select $push1=, $pop54, $pop52, $pop0 +; NO-SIMD128-FAST-NEXT: i32.store16 0($0), $pop1 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push51=, $2 +; NO-SIMD128-FAST-NEXT: local.tee $push50=, $9=, $pop51 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push49=, $10 +; NO-SIMD128-FAST-NEXT: local.tee $push48=, $10=, $pop49 +; NO-SIMD128-FAST-NEXT: i32.lt_s $push2=, $9, $10 +; NO-SIMD128-FAST-NEXT: i32.select $push3=, $pop50, $pop48, $pop2 +; NO-SIMD128-FAST-NEXT: i32.store16 2($0), $pop3 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push47=, $3 +; NO-SIMD128-FAST-NEXT: local.tee $push46=, $10=, $pop47 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push45=, $11 +; NO-SIMD128-FAST-NEXT: local.tee $push44=, $11=, $pop45 +; NO-SIMD128-FAST-NEXT: i32.lt_s $push4=, $10, $11 +; NO-SIMD128-FAST-NEXT: i32.select $push5=, $pop46, $pop44, $pop4 +; NO-SIMD128-FAST-NEXT: i32.store16 4($0), $pop5 +; NO-SIMD128-FAST-NEXT: i32.const $push8=, 6 +; NO-SIMD128-FAST-NEXT: i32.add $push9=, $0, $pop8 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push43=, $4 +; NO-SIMD128-FAST-NEXT: local.tee $push42=, $11=, $pop43 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push41=, $12 +; NO-SIMD128-FAST-NEXT: local.tee $push40=, $12=, $pop41 +; NO-SIMD128-FAST-NEXT: i32.lt_s $push6=, $11, $12 +; NO-SIMD128-FAST-NEXT: i32.select $push7=, $pop42, $pop40, $pop6 +; NO-SIMD128-FAST-NEXT: i32.store16 0($pop9), $pop7 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push39=, $5 +; NO-SIMD128-FAST-NEXT: local.tee $push38=, $12=, $pop39 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push37=, $13 +; NO-SIMD128-FAST-NEXT: local.tee $push36=, $13=, $pop37 +; NO-SIMD128-FAST-NEXT: i32.lt_s $push10=, $12, $13 +; NO-SIMD128-FAST-NEXT: i32.select $push11=, $pop38, $pop36, $pop10 +; NO-SIMD128-FAST-NEXT: i32.store16 8($0), $pop11 +; NO-SIMD128-FAST-NEXT: i32.const $push14=, 10 +; NO-SIMD128-FAST-NEXT: i32.add $push15=, $0, $pop14 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push35=, $6 +; NO-SIMD128-FAST-NEXT: local.tee $push34=, $13=, $pop35 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push33=, $14 +; NO-SIMD128-FAST-NEXT: local.tee $push32=, $14=, $pop33 +; NO-SIMD128-FAST-NEXT: i32.lt_s $push12=, $13, $14 +; NO-SIMD128-FAST-NEXT: i32.select $push13=, $pop34, $pop32, $pop12 +; NO-SIMD128-FAST-NEXT: i32.store16 0($pop15), $pop13 +; NO-SIMD128-FAST-NEXT: i32.const $push18=, 12 +; NO-SIMD128-FAST-NEXT: i32.add $push19=, $0, $pop18 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push31=, $7 +; NO-SIMD128-FAST-NEXT: local.tee $push30=, $14=, $pop31 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push29=, $15 +; NO-SIMD128-FAST-NEXT: local.tee $push28=, $15=, $pop29 +; NO-SIMD128-FAST-NEXT: i32.lt_s $push16=, $14, $15 +; NO-SIMD128-FAST-NEXT: i32.select $push17=, $pop30, $pop28, $pop16 +; NO-SIMD128-FAST-NEXT: i32.store16 0($pop19), $pop17 +; NO-SIMD128-FAST-NEXT: i32.const $push22=, 14 +; NO-SIMD128-FAST-NEXT: i32.add $push23=, $0, $pop22 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push27=, $8 +; NO-SIMD128-FAST-NEXT: local.tee $push26=, $0=, $pop27 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push25=, $16 +; NO-SIMD128-FAST-NEXT: local.tee $push24=, $16=, $pop25 +; NO-SIMD128-FAST-NEXT: i32.lt_s $push20=, $0, $16 +; NO-SIMD128-FAST-NEXT: i32.select $push21=, $pop26, $pop24, $pop20 +; NO-SIMD128-FAST-NEXT: i32.store16 0($pop23), $pop21 ; NO-SIMD128-FAST-NEXT: return %c = icmp slt <8 x i16> %x, %y %a = select <8 x i1> %c, <8 x i16> %x, <8 x i16> %y @@ -6563,139 +6786,171 @@ ; NO-SIMD128-LABEL: min_u_v8i16: ; NO-SIMD128: .functype min_u_v8i16 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> () ; NO-SIMD128-NEXT: # %bb.0: -; NO-SIMD128-NEXT: i32.const $push5=, 14 -; NO-SIMD128-NEXT: i32.add $push6=, $0, $pop5 +; NO-SIMD128-NEXT: i32.const $push3=, 14 +; NO-SIMD128-NEXT: i32.add $push4=, $0, $pop3 ; NO-SIMD128-NEXT: i32.const $push0=, 65535 -; NO-SIMD128-NEXT: i32.and $push2=, $8, $pop0 -; NO-SIMD128-NEXT: i32.const $push55=, 65535 -; NO-SIMD128-NEXT: i32.and $push1=, $16, $pop55 -; NO-SIMD128-NEXT: i32.lt_u $push3=, $pop2, $pop1 -; NO-SIMD128-NEXT: i32.select $push4=, $8, $16, $pop3 -; NO-SIMD128-NEXT: i32.store16 0($pop6), $pop4 -; NO-SIMD128-NEXT: i32.const $push11=, 12 +; NO-SIMD128-NEXT: i32.and $push71=, $8, $pop0 +; NO-SIMD128-NEXT: local.tee $push70=, $8=, $pop71 +; NO-SIMD128-NEXT: i32.const $push69=, 65535 +; NO-SIMD128-NEXT: i32.and $push68=, $16, $pop69 +; NO-SIMD128-NEXT: local.tee $push67=, $16=, $pop68 +; NO-SIMD128-NEXT: i32.lt_u $push1=, $8, $16 +; NO-SIMD128-NEXT: i32.select $push2=, $pop70, $pop67, $pop1 +; NO-SIMD128-NEXT: i32.store16 0($pop4), $pop2 +; NO-SIMD128-NEXT: i32.const $push7=, 12 +; NO-SIMD128-NEXT: i32.add $push8=, $0, $pop7 +; NO-SIMD128-NEXT: i32.const $push66=, 65535 +; NO-SIMD128-NEXT: i32.and $push65=, $7, $pop66 +; NO-SIMD128-NEXT: local.tee $push64=, $16=, $pop65 +; NO-SIMD128-NEXT: i32.const $push63=, 65535 +; NO-SIMD128-NEXT: i32.and $push62=, $15, $pop63 +; NO-SIMD128-NEXT: local.tee $push61=, $8=, $pop62 +; NO-SIMD128-NEXT: i32.lt_u $push5=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push6=, $pop64, $pop61, $pop5 +; NO-SIMD128-NEXT: i32.store16 0($pop8), $pop6 +; NO-SIMD128-NEXT: i32.const $push11=, 10 ; NO-SIMD128-NEXT: i32.add $push12=, $0, $pop11 -; NO-SIMD128-NEXT: i32.const $push54=, 65535 -; NO-SIMD128-NEXT: i32.and $push8=, $7, $pop54 -; NO-SIMD128-NEXT: i32.const $push53=, 65535 -; NO-SIMD128-NEXT: i32.and $push7=, $15, $pop53 -; NO-SIMD128-NEXT: i32.lt_u $push9=, $pop8, $pop7 -; NO-SIMD128-NEXT: i32.select $push10=, $7, $15, $pop9 +; NO-SIMD128-NEXT: i32.const $push60=, 65535 +; NO-SIMD128-NEXT: i32.and $push59=, $6, $pop60 +; NO-SIMD128-NEXT: local.tee $push58=, $16=, $pop59 +; NO-SIMD128-NEXT: i32.const $push57=, 65535 +; NO-SIMD128-NEXT: i32.and $push56=, $14, $pop57 +; NO-SIMD128-NEXT: local.tee $push55=, $8=, $pop56 +; NO-SIMD128-NEXT: i32.lt_u $push9=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push10=, $pop58, $pop55, $pop9 ; NO-SIMD128-NEXT: i32.store16 0($pop12), $pop10 -; NO-SIMD128-NEXT: i32.const $push17=, 10 -; NO-SIMD128-NEXT: i32.add $push18=, $0, $pop17 -; NO-SIMD128-NEXT: i32.const $push52=, 65535 -; NO-SIMD128-NEXT: i32.and $push14=, $6, $pop52 +; NO-SIMD128-NEXT: i32.const $push54=, 65535 +; NO-SIMD128-NEXT: i32.and $push53=, $5, $pop54 +; NO-SIMD128-NEXT: local.tee $push52=, $16=, $pop53 ; NO-SIMD128-NEXT: i32.const $push51=, 65535 -; NO-SIMD128-NEXT: i32.and $push13=, $14, $pop51 -; NO-SIMD128-NEXT: i32.lt_u $push15=, $pop14, $pop13 -; NO-SIMD128-NEXT: i32.select $push16=, $6, $14, $pop15 -; NO-SIMD128-NEXT: i32.store16 0($pop18), $pop16 -; NO-SIMD128-NEXT: i32.const $push50=, 65535 -; NO-SIMD128-NEXT: i32.and $push20=, $5, $pop50 -; NO-SIMD128-NEXT: i32.const $push49=, 65535 -; NO-SIMD128-NEXT: i32.and $push19=, $13, $pop49 -; NO-SIMD128-NEXT: i32.lt_u $push21=, $pop20, $pop19 -; NO-SIMD128-NEXT: i32.select $push22=, $5, $13, $pop21 -; NO-SIMD128-NEXT: i32.store16 8($0), $pop22 -; NO-SIMD128-NEXT: i32.const $push27=, 6 -; NO-SIMD128-NEXT: i32.add $push28=, $0, $pop27 +; NO-SIMD128-NEXT: i32.and $push50=, $13, $pop51 +; NO-SIMD128-NEXT: local.tee $push49=, $8=, $pop50 +; NO-SIMD128-NEXT: i32.lt_u $push13=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push14=, $pop52, $pop49, $pop13 +; NO-SIMD128-NEXT: i32.store16 8($0), $pop14 +; NO-SIMD128-NEXT: i32.const $push17=, 6 +; NO-SIMD128-NEXT: i32.add $push18=, $0, $pop17 ; NO-SIMD128-NEXT: i32.const $push48=, 65535 -; NO-SIMD128-NEXT: i32.and $push24=, $4, $pop48 -; NO-SIMD128-NEXT: i32.const $push47=, 65535 -; NO-SIMD128-NEXT: i32.and $push23=, $12, $pop47 -; NO-SIMD128-NEXT: i32.lt_u $push25=, $pop24, $pop23 -; NO-SIMD128-NEXT: i32.select $push26=, $4, $12, $pop25 -; NO-SIMD128-NEXT: i32.store16 0($pop28), $pop26 -; NO-SIMD128-NEXT: i32.const $push46=, 65535 -; NO-SIMD128-NEXT: i32.and $push30=, $3, $pop46 +; NO-SIMD128-NEXT: i32.and $push47=, $4, $pop48 +; NO-SIMD128-NEXT: local.tee $push46=, $16=, $pop47 ; NO-SIMD128-NEXT: i32.const $push45=, 65535 -; NO-SIMD128-NEXT: i32.and $push29=, $11, $pop45 -; NO-SIMD128-NEXT: i32.lt_u $push31=, $pop30, $pop29 -; NO-SIMD128-NEXT: i32.select $push32=, $3, $11, $pop31 -; NO-SIMD128-NEXT: i32.store16 4($0), $pop32 -; NO-SIMD128-NEXT: i32.const $push44=, 65535 -; NO-SIMD128-NEXT: i32.and $push34=, $2, $pop44 -; NO-SIMD128-NEXT: i32.const $push43=, 65535 -; NO-SIMD128-NEXT: i32.and $push33=, $10, $pop43 -; NO-SIMD128-NEXT: i32.lt_u $push35=, $pop34, $pop33 -; NO-SIMD128-NEXT: i32.select $push36=, $2, $10, $pop35 -; NO-SIMD128-NEXT: i32.store16 2($0), $pop36 +; NO-SIMD128-NEXT: i32.and $push44=, $12, $pop45 +; NO-SIMD128-NEXT: local.tee $push43=, $8=, $pop44 +; NO-SIMD128-NEXT: i32.lt_u $push15=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push16=, $pop46, $pop43, $pop15 +; NO-SIMD128-NEXT: i32.store16 0($pop18), $pop16 ; NO-SIMD128-NEXT: i32.const $push42=, 65535 -; NO-SIMD128-NEXT: i32.and $push38=, $1, $pop42 -; NO-SIMD128-NEXT: i32.const $push41=, 65535 -; NO-SIMD128-NEXT: i32.and $push37=, $9, $pop41 -; NO-SIMD128-NEXT: i32.lt_u $push39=, $pop38, $pop37 -; NO-SIMD128-NEXT: i32.select $push40=, $1, $9, $pop39 -; NO-SIMD128-NEXT: i32.store16 0($0), $pop40 +; NO-SIMD128-NEXT: i32.and $push41=, $3, $pop42 +; NO-SIMD128-NEXT: local.tee $push40=, $16=, $pop41 +; NO-SIMD128-NEXT: i32.const $push39=, 65535 +; NO-SIMD128-NEXT: i32.and $push38=, $11, $pop39 +; NO-SIMD128-NEXT: local.tee $push37=, $8=, $pop38 +; NO-SIMD128-NEXT: i32.lt_u $push19=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push20=, $pop40, $pop37, $pop19 +; NO-SIMD128-NEXT: i32.store16 4($0), $pop20 +; NO-SIMD128-NEXT: i32.const $push36=, 65535 +; NO-SIMD128-NEXT: i32.and $push35=, $2, $pop36 +; NO-SIMD128-NEXT: local.tee $push34=, $16=, $pop35 +; NO-SIMD128-NEXT: i32.const $push33=, 65535 +; NO-SIMD128-NEXT: i32.and $push32=, $10, $pop33 +; NO-SIMD128-NEXT: local.tee $push31=, $8=, $pop32 +; NO-SIMD128-NEXT: i32.lt_u $push21=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push22=, $pop34, $pop31, $pop21 +; NO-SIMD128-NEXT: i32.store16 2($0), $pop22 +; NO-SIMD128-NEXT: i32.const $push30=, 65535 +; NO-SIMD128-NEXT: i32.and $push29=, $1, $pop30 +; NO-SIMD128-NEXT: local.tee $push28=, $16=, $pop29 +; NO-SIMD128-NEXT: i32.const $push27=, 65535 +; NO-SIMD128-NEXT: i32.and $push26=, $9, $pop27 +; NO-SIMD128-NEXT: local.tee $push25=, $8=, $pop26 +; NO-SIMD128-NEXT: i32.lt_u $push23=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push24=, $pop28, $pop25, $pop23 +; NO-SIMD128-NEXT: i32.store16 0($0), $pop24 ; NO-SIMD128-NEXT: return ; ; NO-SIMD128-FAST-LABEL: min_u_v8i16: ; NO-SIMD128-FAST: .functype min_u_v8i16 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> () ; NO-SIMD128-FAST-NEXT: # %bb.0: ; NO-SIMD128-FAST-NEXT: i32.const $push0=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push2=, $1, $pop0 -; NO-SIMD128-FAST-NEXT: i32.const $push55=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push1=, $9, $pop55 -; NO-SIMD128-FAST-NEXT: i32.lt_u $push3=, $pop2, $pop1 -; NO-SIMD128-FAST-NEXT: i32.select $push4=, $1, $9, $pop3 -; NO-SIMD128-FAST-NEXT: i32.store16 0($0), $pop4 +; NO-SIMD128-FAST-NEXT: i32.and $push71=, $1, $pop0 +; NO-SIMD128-FAST-NEXT: local.tee $push70=, $1=, $pop71 +; NO-SIMD128-FAST-NEXT: i32.const $push69=, 65535 +; NO-SIMD128-FAST-NEXT: i32.and $push68=, $9, $pop69 +; NO-SIMD128-FAST-NEXT: local.tee $push67=, $9=, $pop68 +; NO-SIMD128-FAST-NEXT: i32.lt_u $push1=, $1, $9 +; NO-SIMD128-FAST-NEXT: i32.select $push2=, $pop70, $pop67, $pop1 +; NO-SIMD128-FAST-NEXT: i32.store16 0($0), $pop2 +; NO-SIMD128-FAST-NEXT: i32.const $push66=, 65535 +; NO-SIMD128-FAST-NEXT: i32.and $push65=, $2, $pop66 +; NO-SIMD128-FAST-NEXT: local.tee $push64=, $9=, $pop65 +; NO-SIMD128-FAST-NEXT: i32.const $push63=, 65535 +; NO-SIMD128-FAST-NEXT: i32.and $push62=, $10, $pop63 +; NO-SIMD128-FAST-NEXT: local.tee $push61=, $10=, $pop62 +; NO-SIMD128-FAST-NEXT: i32.lt_u $push3=, $9, $10 +; NO-SIMD128-FAST-NEXT: i32.select $push4=, $pop64, $pop61, $pop3 +; NO-SIMD128-FAST-NEXT: i32.store16 2($0), $pop4 +; NO-SIMD128-FAST-NEXT: i32.const $push60=, 65535 +; NO-SIMD128-FAST-NEXT: i32.and $push59=, $3, $pop60 +; NO-SIMD128-FAST-NEXT: local.tee $push58=, $10=, $pop59 +; NO-SIMD128-FAST-NEXT: i32.const $push57=, 65535 +; NO-SIMD128-FAST-NEXT: i32.and $push56=, $11, $pop57 +; NO-SIMD128-FAST-NEXT: local.tee $push55=, $11=, $pop56 +; NO-SIMD128-FAST-NEXT: i32.lt_u $push5=, $10, $11 +; NO-SIMD128-FAST-NEXT: i32.select $push6=, $pop58, $pop55, $pop5 +; NO-SIMD128-FAST-NEXT: i32.store16 4($0), $pop6 +; NO-SIMD128-FAST-NEXT: i32.const $push9=, 6 +; NO-SIMD128-FAST-NEXT: i32.add $push10=, $0, $pop9 ; NO-SIMD128-FAST-NEXT: i32.const $push54=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push6=, $2, $pop54 -; NO-SIMD128-FAST-NEXT: i32.const $push53=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push5=, $10, $pop53 -; NO-SIMD128-FAST-NEXT: i32.lt_u $push7=, $pop6, $pop5 -; NO-SIMD128-FAST-NEXT: i32.select $push8=, $2, $10, $pop7 -; NO-SIMD128-FAST-NEXT: i32.store16 2($0), $pop8 -; NO-SIMD128-FAST-NEXT: i32.const $push52=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push10=, $3, $pop52 +; NO-SIMD128-FAST-NEXT: i32.and $push53=, $4, $pop54 +; NO-SIMD128-FAST-NEXT: local.tee $push52=, $11=, $pop53 ; NO-SIMD128-FAST-NEXT: i32.const $push51=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push9=, $11, $pop51 -; NO-SIMD128-FAST-NEXT: i32.lt_u $push11=, $pop10, $pop9 -; NO-SIMD128-FAST-NEXT: i32.select $push12=, $3, $11, $pop11 -; NO-SIMD128-FAST-NEXT: i32.store16 4($0), $pop12 -; NO-SIMD128-FAST-NEXT: i32.const $push17=, 6 -; NO-SIMD128-FAST-NEXT: i32.add $push18=, $0, $pop17 -; NO-SIMD128-FAST-NEXT: i32.const $push50=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push14=, $4, $pop50 -; NO-SIMD128-FAST-NEXT: i32.const $push49=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push13=, $12, $pop49 -; NO-SIMD128-FAST-NEXT: i32.lt_u $push15=, $pop14, $pop13 -; NO-SIMD128-FAST-NEXT: i32.select $push16=, $4, $12, $pop15 -; NO-SIMD128-FAST-NEXT: i32.store16 0($pop18), $pop16 +; NO-SIMD128-FAST-NEXT: i32.and $push50=, $12, $pop51 +; NO-SIMD128-FAST-NEXT: local.tee $push49=, $12=, $pop50 +; NO-SIMD128-FAST-NEXT: i32.lt_u $push7=, $11, $12 +; NO-SIMD128-FAST-NEXT: i32.select $push8=, $pop52, $pop49, $pop7 +; NO-SIMD128-FAST-NEXT: i32.store16 0($pop10), $pop8 ; NO-SIMD128-FAST-NEXT: i32.const $push48=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push20=, $5, $pop48 -; NO-SIMD128-FAST-NEXT: i32.const $push47=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push19=, $13, $pop47 -; NO-SIMD128-FAST-NEXT: i32.lt_u $push21=, $pop20, $pop19 -; NO-SIMD128-FAST-NEXT: i32.select $push22=, $5, $13, $pop21 -; NO-SIMD128-FAST-NEXT: i32.store16 8($0), $pop22 -; NO-SIMD128-FAST-NEXT: i32.const $push27=, 10 -; NO-SIMD128-FAST-NEXT: i32.add $push28=, $0, $pop27 -; NO-SIMD128-FAST-NEXT: i32.const $push46=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push24=, $6, $pop46 +; NO-SIMD128-FAST-NEXT: i32.and $push47=, $5, $pop48 +; NO-SIMD128-FAST-NEXT: local.tee $push46=, $12=, $pop47 ; NO-SIMD128-FAST-NEXT: i32.const $push45=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push23=, $14, $pop45 -; NO-SIMD128-FAST-NEXT: i32.lt_u $push25=, $pop24, $pop23 -; NO-SIMD128-FAST-NEXT: i32.select $push26=, $6, $14, $pop25 -; NO-SIMD128-FAST-NEXT: i32.store16 0($pop28), $pop26 -; NO-SIMD128-FAST-NEXT: i32.const $push33=, 12 -; NO-SIMD128-FAST-NEXT: i32.add $push34=, $0, $pop33 -; NO-SIMD128-FAST-NEXT: i32.const $push44=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push30=, $7, $pop44 -; NO-SIMD128-FAST-NEXT: i32.const $push43=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push29=, $15, $pop43 -; NO-SIMD128-FAST-NEXT: i32.lt_u $push31=, $pop30, $pop29 -; NO-SIMD128-FAST-NEXT: i32.select $push32=, $7, $15, $pop31 -; NO-SIMD128-FAST-NEXT: i32.store16 0($pop34), $pop32 -; NO-SIMD128-FAST-NEXT: i32.const $push39=, 14 -; NO-SIMD128-FAST-NEXT: i32.add $push40=, $0, $pop39 +; NO-SIMD128-FAST-NEXT: i32.and $push44=, $13, $pop45 +; NO-SIMD128-FAST-NEXT: local.tee $push43=, $13=, $pop44 +; NO-SIMD128-FAST-NEXT: i32.lt_u $push11=, $12, $13 +; NO-SIMD128-FAST-NEXT: i32.select $push12=, $pop46, $pop43, $pop11 +; NO-SIMD128-FAST-NEXT: i32.store16 8($0), $pop12 +; NO-SIMD128-FAST-NEXT: i32.const $push15=, 10 +; NO-SIMD128-FAST-NEXT: i32.add $push16=, $0, $pop15 ; NO-SIMD128-FAST-NEXT: i32.const $push42=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push36=, $8, $pop42 -; NO-SIMD128-FAST-NEXT: i32.const $push41=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push35=, $16, $pop41 -; NO-SIMD128-FAST-NEXT: i32.lt_u $push37=, $pop36, $pop35 -; NO-SIMD128-FAST-NEXT: i32.select $push38=, $8, $16, $pop37 -; NO-SIMD128-FAST-NEXT: i32.store16 0($pop40), $pop38 +; NO-SIMD128-FAST-NEXT: i32.and $push41=, $6, $pop42 +; NO-SIMD128-FAST-NEXT: local.tee $push40=, $13=, $pop41 +; NO-SIMD128-FAST-NEXT: i32.const $push39=, 65535 +; NO-SIMD128-FAST-NEXT: i32.and $push38=, $14, $pop39 +; NO-SIMD128-FAST-NEXT: local.tee $push37=, $14=, $pop38 +; NO-SIMD128-FAST-NEXT: i32.lt_u $push13=, $13, $14 +; NO-SIMD128-FAST-NEXT: i32.select $push14=, $pop40, $pop37, $pop13 +; NO-SIMD128-FAST-NEXT: i32.store16 0($pop16), $pop14 +; NO-SIMD128-FAST-NEXT: i32.const $push19=, 12 +; NO-SIMD128-FAST-NEXT: i32.add $push20=, $0, $pop19 +; NO-SIMD128-FAST-NEXT: i32.const $push36=, 65535 +; NO-SIMD128-FAST-NEXT: i32.and $push35=, $7, $pop36 +; NO-SIMD128-FAST-NEXT: local.tee $push34=, $14=, $pop35 +; NO-SIMD128-FAST-NEXT: i32.const $push33=, 65535 +; NO-SIMD128-FAST-NEXT: i32.and $push32=, $15, $pop33 +; NO-SIMD128-FAST-NEXT: local.tee $push31=, $15=, $pop32 +; NO-SIMD128-FAST-NEXT: i32.lt_u $push17=, $14, $15 +; NO-SIMD128-FAST-NEXT: i32.select $push18=, $pop34, $pop31, $pop17 +; NO-SIMD128-FAST-NEXT: i32.store16 0($pop20), $pop18 +; NO-SIMD128-FAST-NEXT: i32.const $push23=, 14 +; NO-SIMD128-FAST-NEXT: i32.add $push24=, $0, $pop23 +; NO-SIMD128-FAST-NEXT: i32.const $push30=, 65535 +; NO-SIMD128-FAST-NEXT: i32.and $push29=, $8, $pop30 +; NO-SIMD128-FAST-NEXT: local.tee $push28=, $0=, $pop29 +; NO-SIMD128-FAST-NEXT: i32.const $push27=, 65535 +; NO-SIMD128-FAST-NEXT: i32.and $push26=, $16, $pop27 +; NO-SIMD128-FAST-NEXT: local.tee $push25=, $16=, $pop26 +; NO-SIMD128-FAST-NEXT: i32.lt_u $push21=, $0, $16 +; NO-SIMD128-FAST-NEXT: i32.select $push22=, $pop28, $pop25, $pop21 +; NO-SIMD128-FAST-NEXT: i32.store16 0($pop24), $pop22 ; NO-SIMD128-FAST-NEXT: return %c = icmp ult <8 x i16> %x, %y %a = select <8 x i1> %c, <8 x i16> %x, <8 x i16> %y @@ -6718,107 +6973,139 @@ ; NO-SIMD128-LABEL: max_s_v8i16: ; NO-SIMD128: .functype max_s_v8i16 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> () ; NO-SIMD128-NEXT: # %bb.0: -; NO-SIMD128-NEXT: i32.const $push4=, 14 -; NO-SIMD128-NEXT: i32.add $push5=, $0, $pop4 -; NO-SIMD128-NEXT: i32.extend16_s $push1=, $8 -; NO-SIMD128-NEXT: i32.extend16_s $push0=, $16 -; NO-SIMD128-NEXT: i32.gt_s $push2=, $pop1, $pop0 -; NO-SIMD128-NEXT: i32.select $push3=, $8, $16, $pop2 -; NO-SIMD128-NEXT: i32.store16 0($pop5), $pop3 -; NO-SIMD128-NEXT: i32.const $push10=, 12 +; NO-SIMD128-NEXT: i32.const $push2=, 14 +; NO-SIMD128-NEXT: i32.add $push3=, $0, $pop2 +; NO-SIMD128-NEXT: i32.extend16_s $push55=, $8 +; NO-SIMD128-NEXT: local.tee $push54=, $8=, $pop55 +; NO-SIMD128-NEXT: i32.extend16_s $push53=, $16 +; NO-SIMD128-NEXT: local.tee $push52=, $16=, $pop53 +; NO-SIMD128-NEXT: i32.gt_s $push0=, $8, $16 +; NO-SIMD128-NEXT: i32.select $push1=, $pop54, $pop52, $pop0 +; NO-SIMD128-NEXT: i32.store16 0($pop3), $pop1 +; NO-SIMD128-NEXT: i32.const $push6=, 12 +; NO-SIMD128-NEXT: i32.add $push7=, $0, $pop6 +; NO-SIMD128-NEXT: i32.extend16_s $push51=, $7 +; NO-SIMD128-NEXT: local.tee $push50=, $16=, $pop51 +; NO-SIMD128-NEXT: i32.extend16_s $push49=, $15 +; NO-SIMD128-NEXT: local.tee $push48=, $8=, $pop49 +; NO-SIMD128-NEXT: i32.gt_s $push4=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push5=, $pop50, $pop48, $pop4 +; NO-SIMD128-NEXT: i32.store16 0($pop7), $pop5 +; NO-SIMD128-NEXT: i32.const $push10=, 10 ; NO-SIMD128-NEXT: i32.add $push11=, $0, $pop10 -; NO-SIMD128-NEXT: i32.extend16_s $push7=, $7 -; NO-SIMD128-NEXT: i32.extend16_s $push6=, $15 -; NO-SIMD128-NEXT: i32.gt_s $push8=, $pop7, $pop6 -; NO-SIMD128-NEXT: i32.select $push9=, $7, $15, $pop8 +; NO-SIMD128-NEXT: i32.extend16_s $push47=, $6 +; NO-SIMD128-NEXT: local.tee $push46=, $16=, $pop47 +; NO-SIMD128-NEXT: i32.extend16_s $push45=, $14 +; NO-SIMD128-NEXT: local.tee $push44=, $8=, $pop45 +; NO-SIMD128-NEXT: i32.gt_s $push8=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push9=, $pop46, $pop44, $pop8 ; NO-SIMD128-NEXT: i32.store16 0($pop11), $pop9 -; NO-SIMD128-NEXT: i32.const $push16=, 10 +; NO-SIMD128-NEXT: i32.extend16_s $push43=, $5 +; NO-SIMD128-NEXT: local.tee $push42=, $16=, $pop43 +; NO-SIMD128-NEXT: i32.extend16_s $push41=, $13 +; NO-SIMD128-NEXT: local.tee $push40=, $8=, $pop41 +; NO-SIMD128-NEXT: i32.gt_s $push12=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push13=, $pop42, $pop40, $pop12 +; NO-SIMD128-NEXT: i32.store16 8($0), $pop13 +; NO-SIMD128-NEXT: i32.const $push16=, 6 ; NO-SIMD128-NEXT: i32.add $push17=, $0, $pop16 -; NO-SIMD128-NEXT: i32.extend16_s $push13=, $6 -; NO-SIMD128-NEXT: i32.extend16_s $push12=, $14 -; NO-SIMD128-NEXT: i32.gt_s $push14=, $pop13, $pop12 -; NO-SIMD128-NEXT: i32.select $push15=, $6, $14, $pop14 +; NO-SIMD128-NEXT: i32.extend16_s $push39=, $4 +; NO-SIMD128-NEXT: local.tee $push38=, $16=, $pop39 +; NO-SIMD128-NEXT: i32.extend16_s $push37=, $12 +; NO-SIMD128-NEXT: local.tee $push36=, $8=, $pop37 +; NO-SIMD128-NEXT: i32.gt_s $push14=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push15=, $pop38, $pop36, $pop14 ; NO-SIMD128-NEXT: i32.store16 0($pop17), $pop15 -; NO-SIMD128-NEXT: i32.extend16_s $push19=, $5 -; NO-SIMD128-NEXT: i32.extend16_s $push18=, $13 -; NO-SIMD128-NEXT: i32.gt_s $push20=, $pop19, $pop18 -; NO-SIMD128-NEXT: i32.select $push21=, $5, $13, $pop20 -; NO-SIMD128-NEXT: i32.store16 8($0), $pop21 -; NO-SIMD128-NEXT: i32.const $push26=, 6 -; NO-SIMD128-NEXT: i32.add $push27=, $0, $pop26 -; NO-SIMD128-NEXT: i32.extend16_s $push23=, $4 -; NO-SIMD128-NEXT: i32.extend16_s $push22=, $12 -; NO-SIMD128-NEXT: i32.gt_s $push24=, $pop23, $pop22 -; NO-SIMD128-NEXT: i32.select $push25=, $4, $12, $pop24 -; NO-SIMD128-NEXT: i32.store16 0($pop27), $pop25 -; NO-SIMD128-NEXT: i32.extend16_s $push29=, $3 -; NO-SIMD128-NEXT: i32.extend16_s $push28=, $11 -; NO-SIMD128-NEXT: i32.gt_s $push30=, $pop29, $pop28 -; NO-SIMD128-NEXT: i32.select $push31=, $3, $11, $pop30 -; NO-SIMD128-NEXT: i32.store16 4($0), $pop31 -; NO-SIMD128-NEXT: i32.extend16_s $push33=, $2 -; NO-SIMD128-NEXT: i32.extend16_s $push32=, $10 -; NO-SIMD128-NEXT: i32.gt_s $push34=, $pop33, $pop32 -; NO-SIMD128-NEXT: i32.select $push35=, $2, $10, $pop34 -; NO-SIMD128-NEXT: i32.store16 2($0), $pop35 -; NO-SIMD128-NEXT: i32.extend16_s $push37=, $1 -; NO-SIMD128-NEXT: i32.extend16_s $push36=, $9 -; NO-SIMD128-NEXT: i32.gt_s $push38=, $pop37, $pop36 -; NO-SIMD128-NEXT: i32.select $push39=, $1, $9, $pop38 -; NO-SIMD128-NEXT: i32.store16 0($0), $pop39 +; NO-SIMD128-NEXT: i32.extend16_s $push35=, $3 +; NO-SIMD128-NEXT: local.tee $push34=, $16=, $pop35 +; NO-SIMD128-NEXT: i32.extend16_s $push33=, $11 +; NO-SIMD128-NEXT: local.tee $push32=, $8=, $pop33 +; NO-SIMD128-NEXT: i32.gt_s $push18=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push19=, $pop34, $pop32, $pop18 +; NO-SIMD128-NEXT: i32.store16 4($0), $pop19 +; NO-SIMD128-NEXT: i32.extend16_s $push31=, $2 +; NO-SIMD128-NEXT: local.tee $push30=, $16=, $pop31 +; NO-SIMD128-NEXT: i32.extend16_s $push29=, $10 +; NO-SIMD128-NEXT: local.tee $push28=, $8=, $pop29 +; NO-SIMD128-NEXT: i32.gt_s $push20=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push21=, $pop30, $pop28, $pop20 +; NO-SIMD128-NEXT: i32.store16 2($0), $pop21 +; NO-SIMD128-NEXT: i32.extend16_s $push27=, $1 +; NO-SIMD128-NEXT: local.tee $push26=, $16=, $pop27 +; NO-SIMD128-NEXT: i32.extend16_s $push25=, $9 +; NO-SIMD128-NEXT: local.tee $push24=, $8=, $pop25 +; NO-SIMD128-NEXT: i32.gt_s $push22=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push23=, $pop26, $pop24, $pop22 +; NO-SIMD128-NEXT: i32.store16 0($0), $pop23 ; NO-SIMD128-NEXT: return ; ; NO-SIMD128-FAST-LABEL: max_s_v8i16: ; NO-SIMD128-FAST: .functype max_s_v8i16 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> () ; NO-SIMD128-FAST-NEXT: # %bb.0: -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push1=, $1 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push0=, $9 -; NO-SIMD128-FAST-NEXT: i32.gt_s $push2=, $pop1, $pop0 -; NO-SIMD128-FAST-NEXT: i32.select $push3=, $1, $9, $pop2 -; NO-SIMD128-FAST-NEXT: i32.store16 0($0), $pop3 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push5=, $2 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push4=, $10 -; NO-SIMD128-FAST-NEXT: i32.gt_s $push6=, $pop5, $pop4 -; NO-SIMD128-FAST-NEXT: i32.select $push7=, $2, $10, $pop6 -; NO-SIMD128-FAST-NEXT: i32.store16 2($0), $pop7 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push9=, $3 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push8=, $11 -; NO-SIMD128-FAST-NEXT: i32.gt_s $push10=, $pop9, $pop8 -; NO-SIMD128-FAST-NEXT: i32.select $push11=, $3, $11, $pop10 -; NO-SIMD128-FAST-NEXT: i32.store16 4($0), $pop11 -; NO-SIMD128-FAST-NEXT: i32.const $push16=, 6 -; NO-SIMD128-FAST-NEXT: i32.add $push17=, $0, $pop16 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push13=, $4 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push12=, $12 -; NO-SIMD128-FAST-NEXT: i32.gt_s $push14=, $pop13, $pop12 -; NO-SIMD128-FAST-NEXT: i32.select $push15=, $4, $12, $pop14 -; NO-SIMD128-FAST-NEXT: i32.store16 0($pop17), $pop15 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push19=, $5 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push18=, $13 -; NO-SIMD128-FAST-NEXT: i32.gt_s $push20=, $pop19, $pop18 -; NO-SIMD128-FAST-NEXT: i32.select $push21=, $5, $13, $pop20 -; NO-SIMD128-FAST-NEXT: i32.store16 8($0), $pop21 -; NO-SIMD128-FAST-NEXT: i32.const $push26=, 10 -; NO-SIMD128-FAST-NEXT: i32.add $push27=, $0, $pop26 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push23=, $6 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push22=, $14 -; NO-SIMD128-FAST-NEXT: i32.gt_s $push24=, $pop23, $pop22 -; NO-SIMD128-FAST-NEXT: i32.select $push25=, $6, $14, $pop24 -; NO-SIMD128-FAST-NEXT: i32.store16 0($pop27), $pop25 -; NO-SIMD128-FAST-NEXT: i32.const $push32=, 12 -; NO-SIMD128-FAST-NEXT: i32.add $push33=, $0, $pop32 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push29=, $7 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push28=, $15 -; NO-SIMD128-FAST-NEXT: i32.gt_s $push30=, $pop29, $pop28 -; NO-SIMD128-FAST-NEXT: i32.select $push31=, $7, $15, $pop30 -; NO-SIMD128-FAST-NEXT: i32.store16 0($pop33), $pop31 -; NO-SIMD128-FAST-NEXT: i32.const $push38=, 14 -; NO-SIMD128-FAST-NEXT: i32.add $push39=, $0, $pop38 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push35=, $8 -; NO-SIMD128-FAST-NEXT: i32.extend16_s $push34=, $16 -; NO-SIMD128-FAST-NEXT: i32.gt_s $push36=, $pop35, $pop34 -; NO-SIMD128-FAST-NEXT: i32.select $push37=, $8, $16, $pop36 -; NO-SIMD128-FAST-NEXT: i32.store16 0($pop39), $pop37 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push55=, $1 +; NO-SIMD128-FAST-NEXT: local.tee $push54=, $1=, $pop55 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push53=, $9 +; NO-SIMD128-FAST-NEXT: local.tee $push52=, $9=, $pop53 +; NO-SIMD128-FAST-NEXT: i32.gt_s $push0=, $1, $9 +; NO-SIMD128-FAST-NEXT: i32.select $push1=, $pop54, $pop52, $pop0 +; NO-SIMD128-FAST-NEXT: i32.store16 0($0), $pop1 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push51=, $2 +; NO-SIMD128-FAST-NEXT: local.tee $push50=, $9=, $pop51 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push49=, $10 +; NO-SIMD128-FAST-NEXT: local.tee $push48=, $10=, $pop49 +; NO-SIMD128-FAST-NEXT: i32.gt_s $push2=, $9, $10 +; NO-SIMD128-FAST-NEXT: i32.select $push3=, $pop50, $pop48, $pop2 +; NO-SIMD128-FAST-NEXT: i32.store16 2($0), $pop3 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push47=, $3 +; NO-SIMD128-FAST-NEXT: local.tee $push46=, $10=, $pop47 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push45=, $11 +; NO-SIMD128-FAST-NEXT: local.tee $push44=, $11=, $pop45 +; NO-SIMD128-FAST-NEXT: i32.gt_s $push4=, $10, $11 +; NO-SIMD128-FAST-NEXT: i32.select $push5=, $pop46, $pop44, $pop4 +; NO-SIMD128-FAST-NEXT: i32.store16 4($0), $pop5 +; NO-SIMD128-FAST-NEXT: i32.const $push8=, 6 +; NO-SIMD128-FAST-NEXT: i32.add $push9=, $0, $pop8 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push43=, $4 +; NO-SIMD128-FAST-NEXT: local.tee $push42=, $11=, $pop43 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push41=, $12 +; NO-SIMD128-FAST-NEXT: local.tee $push40=, $12=, $pop41 +; NO-SIMD128-FAST-NEXT: i32.gt_s $push6=, $11, $12 +; NO-SIMD128-FAST-NEXT: i32.select $push7=, $pop42, $pop40, $pop6 +; NO-SIMD128-FAST-NEXT: i32.store16 0($pop9), $pop7 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push39=, $5 +; NO-SIMD128-FAST-NEXT: local.tee $push38=, $12=, $pop39 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push37=, $13 +; NO-SIMD128-FAST-NEXT: local.tee $push36=, $13=, $pop37 +; NO-SIMD128-FAST-NEXT: i32.gt_s $push10=, $12, $13 +; NO-SIMD128-FAST-NEXT: i32.select $push11=, $pop38, $pop36, $pop10 +; NO-SIMD128-FAST-NEXT: i32.store16 8($0), $pop11 +; NO-SIMD128-FAST-NEXT: i32.const $push14=, 10 +; NO-SIMD128-FAST-NEXT: i32.add $push15=, $0, $pop14 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push35=, $6 +; NO-SIMD128-FAST-NEXT: local.tee $push34=, $13=, $pop35 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push33=, $14 +; NO-SIMD128-FAST-NEXT: local.tee $push32=, $14=, $pop33 +; NO-SIMD128-FAST-NEXT: i32.gt_s $push12=, $13, $14 +; NO-SIMD128-FAST-NEXT: i32.select $push13=, $pop34, $pop32, $pop12 +; NO-SIMD128-FAST-NEXT: i32.store16 0($pop15), $pop13 +; NO-SIMD128-FAST-NEXT: i32.const $push18=, 12 +; NO-SIMD128-FAST-NEXT: i32.add $push19=, $0, $pop18 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push31=, $7 +; NO-SIMD128-FAST-NEXT: local.tee $push30=, $14=, $pop31 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push29=, $15 +; NO-SIMD128-FAST-NEXT: local.tee $push28=, $15=, $pop29 +; NO-SIMD128-FAST-NEXT: i32.gt_s $push16=, $14, $15 +; NO-SIMD128-FAST-NEXT: i32.select $push17=, $pop30, $pop28, $pop16 +; NO-SIMD128-FAST-NEXT: i32.store16 0($pop19), $pop17 +; NO-SIMD128-FAST-NEXT: i32.const $push22=, 14 +; NO-SIMD128-FAST-NEXT: i32.add $push23=, $0, $pop22 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push27=, $8 +; NO-SIMD128-FAST-NEXT: local.tee $push26=, $0=, $pop27 +; NO-SIMD128-FAST-NEXT: i32.extend16_s $push25=, $16 +; NO-SIMD128-FAST-NEXT: local.tee $push24=, $16=, $pop25 +; NO-SIMD128-FAST-NEXT: i32.gt_s $push20=, $0, $16 +; NO-SIMD128-FAST-NEXT: i32.select $push21=, $pop26, $pop24, $pop20 +; NO-SIMD128-FAST-NEXT: i32.store16 0($pop23), $pop21 ; NO-SIMD128-FAST-NEXT: return %c = icmp sgt <8 x i16> %x, %y %a = select <8 x i1> %c, <8 x i16> %x, <8 x i16> %y @@ -6841,139 +7128,171 @@ ; NO-SIMD128-LABEL: max_u_v8i16: ; NO-SIMD128: .functype max_u_v8i16 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> () ; NO-SIMD128-NEXT: # %bb.0: -; NO-SIMD128-NEXT: i32.const $push5=, 14 -; NO-SIMD128-NEXT: i32.add $push6=, $0, $pop5 +; NO-SIMD128-NEXT: i32.const $push3=, 14 +; NO-SIMD128-NEXT: i32.add $push4=, $0, $pop3 ; NO-SIMD128-NEXT: i32.const $push0=, 65535 -; NO-SIMD128-NEXT: i32.and $push2=, $8, $pop0 -; NO-SIMD128-NEXT: i32.const $push55=, 65535 -; NO-SIMD128-NEXT: i32.and $push1=, $16, $pop55 -; NO-SIMD128-NEXT: i32.gt_u $push3=, $pop2, $pop1 -; NO-SIMD128-NEXT: i32.select $push4=, $8, $16, $pop3 -; NO-SIMD128-NEXT: i32.store16 0($pop6), $pop4 -; NO-SIMD128-NEXT: i32.const $push11=, 12 +; NO-SIMD128-NEXT: i32.and $push71=, $8, $pop0 +; NO-SIMD128-NEXT: local.tee $push70=, $8=, $pop71 +; NO-SIMD128-NEXT: i32.const $push69=, 65535 +; NO-SIMD128-NEXT: i32.and $push68=, $16, $pop69 +; NO-SIMD128-NEXT: local.tee $push67=, $16=, $pop68 +; NO-SIMD128-NEXT: i32.gt_u $push1=, $8, $16 +; NO-SIMD128-NEXT: i32.select $push2=, $pop70, $pop67, $pop1 +; NO-SIMD128-NEXT: i32.store16 0($pop4), $pop2 +; NO-SIMD128-NEXT: i32.const $push7=, 12 +; NO-SIMD128-NEXT: i32.add $push8=, $0, $pop7 +; NO-SIMD128-NEXT: i32.const $push66=, 65535 +; NO-SIMD128-NEXT: i32.and $push65=, $7, $pop66 +; NO-SIMD128-NEXT: local.tee $push64=, $16=, $pop65 +; NO-SIMD128-NEXT: i32.const $push63=, 65535 +; NO-SIMD128-NEXT: i32.and $push62=, $15, $pop63 +; NO-SIMD128-NEXT: local.tee $push61=, $8=, $pop62 +; NO-SIMD128-NEXT: i32.gt_u $push5=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push6=, $pop64, $pop61, $pop5 +; NO-SIMD128-NEXT: i32.store16 0($pop8), $pop6 +; NO-SIMD128-NEXT: i32.const $push11=, 10 ; NO-SIMD128-NEXT: i32.add $push12=, $0, $pop11 -; NO-SIMD128-NEXT: i32.const $push54=, 65535 -; NO-SIMD128-NEXT: i32.and $push8=, $7, $pop54 -; NO-SIMD128-NEXT: i32.const $push53=, 65535 -; NO-SIMD128-NEXT: i32.and $push7=, $15, $pop53 -; NO-SIMD128-NEXT: i32.gt_u $push9=, $pop8, $pop7 -; NO-SIMD128-NEXT: i32.select $push10=, $7, $15, $pop9 +; NO-SIMD128-NEXT: i32.const $push60=, 65535 +; NO-SIMD128-NEXT: i32.and $push59=, $6, $pop60 +; NO-SIMD128-NEXT: local.tee $push58=, $16=, $pop59 +; NO-SIMD128-NEXT: i32.const $push57=, 65535 +; NO-SIMD128-NEXT: i32.and $push56=, $14, $pop57 +; NO-SIMD128-NEXT: local.tee $push55=, $8=, $pop56 +; NO-SIMD128-NEXT: i32.gt_u $push9=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push10=, $pop58, $pop55, $pop9 ; NO-SIMD128-NEXT: i32.store16 0($pop12), $pop10 -; NO-SIMD128-NEXT: i32.const $push17=, 10 -; NO-SIMD128-NEXT: i32.add $push18=, $0, $pop17 -; NO-SIMD128-NEXT: i32.const $push52=, 65535 -; NO-SIMD128-NEXT: i32.and $push14=, $6, $pop52 +; NO-SIMD128-NEXT: i32.const $push54=, 65535 +; NO-SIMD128-NEXT: i32.and $push53=, $5, $pop54 +; NO-SIMD128-NEXT: local.tee $push52=, $16=, $pop53 ; NO-SIMD128-NEXT: i32.const $push51=, 65535 -; NO-SIMD128-NEXT: i32.and $push13=, $14, $pop51 -; NO-SIMD128-NEXT: i32.gt_u $push15=, $pop14, $pop13 -; NO-SIMD128-NEXT: i32.select $push16=, $6, $14, $pop15 -; NO-SIMD128-NEXT: i32.store16 0($pop18), $pop16 -; NO-SIMD128-NEXT: i32.const $push50=, 65535 -; NO-SIMD128-NEXT: i32.and $push20=, $5, $pop50 -; NO-SIMD128-NEXT: i32.const $push49=, 65535 -; NO-SIMD128-NEXT: i32.and $push19=, $13, $pop49 -; NO-SIMD128-NEXT: i32.gt_u $push21=, $pop20, $pop19 -; NO-SIMD128-NEXT: i32.select $push22=, $5, $13, $pop21 -; NO-SIMD128-NEXT: i32.store16 8($0), $pop22 -; NO-SIMD128-NEXT: i32.const $push27=, 6 -; NO-SIMD128-NEXT: i32.add $push28=, $0, $pop27 -; NO-SIMD128-NEXT: i32.const $push48=, 65535 -; NO-SIMD128-NEXT: i32.and $push24=, $4, $pop48 -; NO-SIMD128-NEXT: i32.const $push47=, 65535 -; NO-SIMD128-NEXT: i32.and $push23=, $12, $pop47 -; NO-SIMD128-NEXT: i32.gt_u $push25=, $pop24, $pop23 -; NO-SIMD128-NEXT: i32.select $push26=, $4, $12, $pop25 -; NO-SIMD128-NEXT: i32.store16 0($pop28), $pop26 -; NO-SIMD128-NEXT: i32.const $push46=, 65535 -; NO-SIMD128-NEXT: i32.and $push30=, $3, $pop46 +; NO-SIMD128-NEXT: i32.and $push50=, $13, $pop51 +; NO-SIMD128-NEXT: local.tee $push49=, $8=, $pop50 +; NO-SIMD128-NEXT: i32.gt_u $push13=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push14=, $pop52, $pop49, $pop13 +; NO-SIMD128-NEXT: i32.store16 8($0), $pop14 +; NO-SIMD128-NEXT: i32.const $push17=, 6 +; NO-SIMD128-NEXT: i32.add $push18=, $0, $pop17 +; NO-SIMD128-NEXT: i32.const $push48=, 65535 +; NO-SIMD128-NEXT: i32.and $push47=, $4, $pop48 +; NO-SIMD128-NEXT: local.tee $push46=, $16=, $pop47 ; NO-SIMD128-NEXT: i32.const $push45=, 65535 -; NO-SIMD128-NEXT: i32.and $push29=, $11, $pop45 -; NO-SIMD128-NEXT: i32.gt_u $push31=, $pop30, $pop29 -; NO-SIMD128-NEXT: i32.select $push32=, $3, $11, $pop31 -; NO-SIMD128-NEXT: i32.store16 4($0), $pop32 -; NO-SIMD128-NEXT: i32.const $push44=, 65535 -; NO-SIMD128-NEXT: i32.and $push34=, $2, $pop44 -; NO-SIMD128-NEXT: i32.const $push43=, 65535 -; NO-SIMD128-NEXT: i32.and $push33=, $10, $pop43 -; NO-SIMD128-NEXT: i32.gt_u $push35=, $pop34, $pop33 -; NO-SIMD128-NEXT: i32.select $push36=, $2, $10, $pop35 -; NO-SIMD128-NEXT: i32.store16 2($0), $pop36 +; NO-SIMD128-NEXT: i32.and $push44=, $12, $pop45 +; NO-SIMD128-NEXT: local.tee $push43=, $8=, $pop44 +; NO-SIMD128-NEXT: i32.gt_u $push15=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push16=, $pop46, $pop43, $pop15 +; NO-SIMD128-NEXT: i32.store16 0($pop18), $pop16 ; NO-SIMD128-NEXT: i32.const $push42=, 65535 -; NO-SIMD128-NEXT: i32.and $push38=, $1, $pop42 -; NO-SIMD128-NEXT: i32.const $push41=, 65535 -; NO-SIMD128-NEXT: i32.and $push37=, $9, $pop41 -; NO-SIMD128-NEXT: i32.gt_u $push39=, $pop38, $pop37 -; NO-SIMD128-NEXT: i32.select $push40=, $1, $9, $pop39 -; NO-SIMD128-NEXT: i32.store16 0($0), $pop40 +; NO-SIMD128-NEXT: i32.and $push41=, $3, $pop42 +; NO-SIMD128-NEXT: local.tee $push40=, $16=, $pop41 +; NO-SIMD128-NEXT: i32.const $push39=, 65535 +; NO-SIMD128-NEXT: i32.and $push38=, $11, $pop39 +; NO-SIMD128-NEXT: local.tee $push37=, $8=, $pop38 +; NO-SIMD128-NEXT: i32.gt_u $push19=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push20=, $pop40, $pop37, $pop19 +; NO-SIMD128-NEXT: i32.store16 4($0), $pop20 +; NO-SIMD128-NEXT: i32.const $push36=, 65535 +; NO-SIMD128-NEXT: i32.and $push35=, $2, $pop36 +; NO-SIMD128-NEXT: local.tee $push34=, $16=, $pop35 +; NO-SIMD128-NEXT: i32.const $push33=, 65535 +; NO-SIMD128-NEXT: i32.and $push32=, $10, $pop33 +; NO-SIMD128-NEXT: local.tee $push31=, $8=, $pop32 +; NO-SIMD128-NEXT: i32.gt_u $push21=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push22=, $pop34, $pop31, $pop21 +; NO-SIMD128-NEXT: i32.store16 2($0), $pop22 +; NO-SIMD128-NEXT: i32.const $push30=, 65535 +; NO-SIMD128-NEXT: i32.and $push29=, $1, $pop30 +; NO-SIMD128-NEXT: local.tee $push28=, $16=, $pop29 +; NO-SIMD128-NEXT: i32.const $push27=, 65535 +; NO-SIMD128-NEXT: i32.and $push26=, $9, $pop27 +; NO-SIMD128-NEXT: local.tee $push25=, $8=, $pop26 +; NO-SIMD128-NEXT: i32.gt_u $push23=, $16, $8 +; NO-SIMD128-NEXT: i32.select $push24=, $pop28, $pop25, $pop23 +; NO-SIMD128-NEXT: i32.store16 0($0), $pop24 ; NO-SIMD128-NEXT: return ; ; NO-SIMD128-FAST-LABEL: max_u_v8i16: ; NO-SIMD128-FAST: .functype max_u_v8i16 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> () ; NO-SIMD128-FAST-NEXT: # %bb.0: ; NO-SIMD128-FAST-NEXT: i32.const $push0=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push2=, $1, $pop0 -; NO-SIMD128-FAST-NEXT: i32.const $push55=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push1=, $9, $pop55 -; NO-SIMD128-FAST-NEXT: i32.gt_u $push3=, $pop2, $pop1 -; NO-SIMD128-FAST-NEXT: i32.select $push4=, $1, $9, $pop3 -; NO-SIMD128-FAST-NEXT: i32.store16 0($0), $pop4 +; NO-SIMD128-FAST-NEXT: i32.and $push71=, $1, $pop0 +; NO-SIMD128-FAST-NEXT: local.tee $push70=, $1=, $pop71 +; NO-SIMD128-FAST-NEXT: i32.const $push69=, 65535 +; NO-SIMD128-FAST-NEXT: i32.and $push68=, $9, $pop69 +; NO-SIMD128-FAST-NEXT: local.tee $push67=, $9=, $pop68 +; NO-SIMD128-FAST-NEXT: i32.gt_u $push1=, $1, $9 +; NO-SIMD128-FAST-NEXT: i32.select $push2=, $pop70, $pop67, $pop1 +; NO-SIMD128-FAST-NEXT: i32.store16 0($0), $pop2 +; NO-SIMD128-FAST-NEXT: i32.const $push66=, 65535 +; NO-SIMD128-FAST-NEXT: i32.and $push65=, $2, $pop66 +; NO-SIMD128-FAST-NEXT: local.tee $push64=, $9=, $pop65 +; NO-SIMD128-FAST-NEXT: i32.const $push63=, 65535 +; NO-SIMD128-FAST-NEXT: i32.and $push62=, $10, $pop63 +; NO-SIMD128-FAST-NEXT: local.tee $push61=, $10=, $pop62 +; NO-SIMD128-FAST-NEXT: i32.gt_u $push3=, $9, $10 +; NO-SIMD128-FAST-NEXT: i32.select $push4=, $pop64, $pop61, $pop3 +; NO-SIMD128-FAST-NEXT: i32.store16 2($0), $pop4 +; NO-SIMD128-FAST-NEXT: i32.const $push60=, 65535 +; NO-SIMD128-FAST-NEXT: i32.and $push59=, $3, $pop60 +; NO-SIMD128-FAST-NEXT: local.tee $push58=, $10=, $pop59 +; NO-SIMD128-FAST-NEXT: i32.const $push57=, 65535 +; NO-SIMD128-FAST-NEXT: i32.and $push56=, $11, $pop57 +; NO-SIMD128-FAST-NEXT: local.tee $push55=, $11=, $pop56 +; NO-SIMD128-FAST-NEXT: i32.gt_u $push5=, $10, $11 +; NO-SIMD128-FAST-NEXT: i32.select $push6=, $pop58, $pop55, $pop5 +; NO-SIMD128-FAST-NEXT: i32.store16 4($0), $pop6 +; NO-SIMD128-FAST-NEXT: i32.const $push9=, 6 +; NO-SIMD128-FAST-NEXT: i32.add $push10=, $0, $pop9 ; NO-SIMD128-FAST-NEXT: i32.const $push54=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push6=, $2, $pop54 -; NO-SIMD128-FAST-NEXT: i32.const $push53=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push5=, $10, $pop53 -; NO-SIMD128-FAST-NEXT: i32.gt_u $push7=, $pop6, $pop5 -; NO-SIMD128-FAST-NEXT: i32.select $push8=, $2, $10, $pop7 -; NO-SIMD128-FAST-NEXT: i32.store16 2($0), $pop8 -; NO-SIMD128-FAST-NEXT: i32.const $push52=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push10=, $3, $pop52 +; NO-SIMD128-FAST-NEXT: i32.and $push53=, $4, $pop54 +; NO-SIMD128-FAST-NEXT: local.tee $push52=, $11=, $pop53 ; NO-SIMD128-FAST-NEXT: i32.const $push51=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push9=, $11, $pop51 -; NO-SIMD128-FAST-NEXT: i32.gt_u $push11=, $pop10, $pop9 -; NO-SIMD128-FAST-NEXT: i32.select $push12=, $3, $11, $pop11 -; NO-SIMD128-FAST-NEXT: i32.store16 4($0), $pop12 -; NO-SIMD128-FAST-NEXT: i32.const $push17=, 6 -; NO-SIMD128-FAST-NEXT: i32.add $push18=, $0, $pop17 -; NO-SIMD128-FAST-NEXT: i32.const $push50=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push14=, $4, $pop50 -; NO-SIMD128-FAST-NEXT: i32.const $push49=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push13=, $12, $pop49 -; NO-SIMD128-FAST-NEXT: i32.gt_u $push15=, $pop14, $pop13 -; NO-SIMD128-FAST-NEXT: i32.select $push16=, $4, $12, $pop15 -; NO-SIMD128-FAST-NEXT: i32.store16 0($pop18), $pop16 +; NO-SIMD128-FAST-NEXT: i32.and $push50=, $12, $pop51 +; NO-SIMD128-FAST-NEXT: local.tee $push49=, $12=, $pop50 +; NO-SIMD128-FAST-NEXT: i32.gt_u $push7=, $11, $12 +; NO-SIMD128-FAST-NEXT: i32.select $push8=, $pop52, $pop49, $pop7 +; NO-SIMD128-FAST-NEXT: i32.store16 0($pop10), $pop8 ; NO-SIMD128-FAST-NEXT: i32.const $push48=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push20=, $5, $pop48 -; NO-SIMD128-FAST-NEXT: i32.const $push47=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push19=, $13, $pop47 -; NO-SIMD128-FAST-NEXT: i32.gt_u $push21=, $pop20, $pop19 -; NO-SIMD128-FAST-NEXT: i32.select $push22=, $5, $13, $pop21 -; NO-SIMD128-FAST-NEXT: i32.store16 8($0), $pop22 -; NO-SIMD128-FAST-NEXT: i32.const $push27=, 10 -; NO-SIMD128-FAST-NEXT: i32.add $push28=, $0, $pop27 -; NO-SIMD128-FAST-NEXT: i32.const $push46=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push24=, $6, $pop46 +; NO-SIMD128-FAST-NEXT: i32.and $push47=, $5, $pop48 +; NO-SIMD128-FAST-NEXT: local.tee $push46=, $12=, $pop47 ; NO-SIMD128-FAST-NEXT: i32.const $push45=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push23=, $14, $pop45 -; NO-SIMD128-FAST-NEXT: i32.gt_u $push25=, $pop24, $pop23 -; NO-SIMD128-FAST-NEXT: i32.select $push26=, $6, $14, $pop25 -; NO-SIMD128-FAST-NEXT: i32.store16 0($pop28), $pop26 -; NO-SIMD128-FAST-NEXT: i32.const $push33=, 12 -; NO-SIMD128-FAST-NEXT: i32.add $push34=, $0, $pop33 -; NO-SIMD128-FAST-NEXT: i32.const $push44=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push30=, $7, $pop44 -; NO-SIMD128-FAST-NEXT: i32.const $push43=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push29=, $15, $pop43 -; NO-SIMD128-FAST-NEXT: i32.gt_u $push31=, $pop30, $pop29 -; NO-SIMD128-FAST-NEXT: i32.select $push32=, $7, $15, $pop31 -; NO-SIMD128-FAST-NEXT: i32.store16 0($pop34), $pop32 -; NO-SIMD128-FAST-NEXT: i32.const $push39=, 14 -; NO-SIMD128-FAST-NEXT: i32.add $push40=, $0, $pop39 +; NO-SIMD128-FAST-NEXT: i32.and $push44=, $13, $pop45 +; NO-SIMD128-FAST-NEXT: local.tee $push43=, $13=, $pop44 +; NO-SIMD128-FAST-NEXT: i32.gt_u $push11=, $12, $13 +; NO-SIMD128-FAST-NEXT: i32.select $push12=, $pop46, $pop43, $pop11 +; NO-SIMD128-FAST-NEXT: i32.store16 8($0), $pop12 +; NO-SIMD128-FAST-NEXT: i32.const $push15=, 10 +; NO-SIMD128-FAST-NEXT: i32.add $push16=, $0, $pop15 ; NO-SIMD128-FAST-NEXT: i32.const $push42=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push36=, $8, $pop42 -; NO-SIMD128-FAST-NEXT: i32.const $push41=, 65535 -; NO-SIMD128-FAST-NEXT: i32.and $push35=, $16, $pop41 -; NO-SIMD128-FAST-NEXT: i32.gt_u $push37=, $pop36, $pop35 -; NO-SIMD128-FAST-NEXT: i32.select $push38=, $8, $16, $pop37 -; NO-SIMD128-FAST-NEXT: i32.store16 0($pop40), $pop38 +; NO-SIMD128-FAST-NEXT: i32.and $push41=, $6, $pop42 +; NO-SIMD128-FAST-NEXT: local.tee $push40=, $13=, $pop41 +; NO-SIMD128-FAST-NEXT: i32.const $push39=, 65535 +; NO-SIMD128-FAST-NEXT: i32.and $push38=, $14, $pop39 +; NO-SIMD128-FAST-NEXT: local.tee $push37=, $14=, $pop38 +; NO-SIMD128-FAST-NEXT: i32.gt_u $push13=, $13, $14 +; NO-SIMD128-FAST-NEXT: i32.select $push14=, $pop40, $pop37, $pop13 +; NO-SIMD128-FAST-NEXT: i32.store16 0($pop16), $pop14 +; NO-SIMD128-FAST-NEXT: i32.const $push19=, 12 +; NO-SIMD128-FAST-NEXT: i32.add $push20=, $0, $pop19 +; NO-SIMD128-FAST-NEXT: i32.const $push36=, 65535 +; NO-SIMD128-FAST-NEXT: i32.and $push35=, $7, $pop36 +; NO-SIMD128-FAST-NEXT: local.tee $push34=, $14=, $pop35 +; NO-SIMD128-FAST-NEXT: i32.const $push33=, 65535 +; NO-SIMD128-FAST-NEXT: i32.and $push32=, $15, $pop33 +; NO-SIMD128-FAST-NEXT: local.tee $push31=, $15=, $pop32 +; NO-SIMD128-FAST-NEXT: i32.gt_u $push17=, $14, $15 +; NO-SIMD128-FAST-NEXT: i32.select $push18=, $pop34, $pop31, $pop17 +; NO-SIMD128-FAST-NEXT: i32.store16 0($pop20), $pop18 +; NO-SIMD128-FAST-NEXT: i32.const $push23=, 14 +; NO-SIMD128-FAST-NEXT: i32.add $push24=, $0, $pop23 +; NO-SIMD128-FAST-NEXT: i32.const $push30=, 65535 +; NO-SIMD128-FAST-NEXT: i32.and $push29=, $8, $pop30 +; NO-SIMD128-FAST-NEXT: local.tee $push28=, $0=, $pop29 +; NO-SIMD128-FAST-NEXT: i32.const $push27=, 65535 +; NO-SIMD128-FAST-NEXT: i32.and $push26=, $16, $pop27 +; NO-SIMD128-FAST-NEXT: local.tee $push25=, $16=, $pop26 +; NO-SIMD128-FAST-NEXT: i32.gt_u $push21=, $0, $16 +; NO-SIMD128-FAST-NEXT: i32.select $push22=, $pop28, $pop25, $pop21 +; NO-SIMD128-FAST-NEXT: i32.store16 0($pop24), $pop22 ; NO-SIMD128-FAST-NEXT: return %c = icmp ugt <8 x i16> %x, %y %a = select <8 x i1> %c, <8 x i16> %x, <8 x i16> %y @@ -8941,7 +9260,7 @@ ; SIMD128-FAST: .functype andnot_v8i16 (v128, v128) -> (v128) ; SIMD128-FAST-NEXT: # %bb.0: ; SIMD128-FAST-NEXT: v128.not $push0=, $1 -; SIMD128-FAST-NEXT: v128.and $push1=, $0, $pop0 +; SIMD128-FAST-NEXT: v128.and $push1=, $pop0, $0 ; SIMD128-FAST-NEXT: return $pop1 ; ; NO-SIMD128-LABEL: andnot_v8i16: @@ -8949,43 +9268,43 @@ ; NO-SIMD128-NEXT: # %bb.0: ; NO-SIMD128-NEXT: i32.const $push0=, -1 ; NO-SIMD128-NEXT: i32.xor $push1=, $13, $pop0 -; NO-SIMD128-NEXT: i32.and $push2=, $5, $pop1 +; NO-SIMD128-NEXT: i32.and $push2=, $pop1, $5 ; NO-SIMD128-NEXT: i32.store16 8($0), $pop2 ; NO-SIMD128-NEXT: i32.const $push31=, -1 ; NO-SIMD128-NEXT: i32.xor $push3=, $11, $pop31 -; NO-SIMD128-NEXT: i32.and $push4=, $3, $pop3 +; NO-SIMD128-NEXT: i32.and $push4=, $pop3, $3 ; NO-SIMD128-NEXT: i32.store16 4($0), $pop4 ; NO-SIMD128-NEXT: i32.const $push30=, -1 ; NO-SIMD128-NEXT: i32.xor $push5=, $10, $pop30 -; NO-SIMD128-NEXT: i32.and $push6=, $2, $pop5 +; NO-SIMD128-NEXT: i32.and $push6=, $pop5, $2 ; NO-SIMD128-NEXT: i32.store16 2($0), $pop6 ; NO-SIMD128-NEXT: i32.const $push29=, -1 ; NO-SIMD128-NEXT: i32.xor $push7=, $9, $pop29 -; NO-SIMD128-NEXT: i32.and $push8=, $1, $pop7 +; NO-SIMD128-NEXT: i32.and $push8=, $pop7, $1 ; NO-SIMD128-NEXT: i32.store16 0($0), $pop8 ; NO-SIMD128-NEXT: i32.const $push11=, 14 ; NO-SIMD128-NEXT: i32.add $push12=, $0, $pop11 ; NO-SIMD128-NEXT: i32.const $push28=, -1 ; NO-SIMD128-NEXT: i32.xor $push9=, $16, $pop28 -; NO-SIMD128-NEXT: i32.and $push10=, $8, $pop9 +; NO-SIMD128-NEXT: i32.and $push10=, $pop9, $8 ; NO-SIMD128-NEXT: i32.store16 0($pop12), $pop10 ; NO-SIMD128-NEXT: i32.const $push15=, 12 ; NO-SIMD128-NEXT: i32.add $push16=, $0, $pop15 ; NO-SIMD128-NEXT: i32.const $push27=, -1 ; NO-SIMD128-NEXT: i32.xor $push13=, $15, $pop27 -; NO-SIMD128-NEXT: i32.and $push14=, $7, $pop13 +; NO-SIMD128-NEXT: i32.and $push14=, $pop13, $7 ; NO-SIMD128-NEXT: i32.store16 0($pop16), $pop14 ; NO-SIMD128-NEXT: i32.const $push19=, 10 ; NO-SIMD128-NEXT: i32.add $push20=, $0, $pop19 ; NO-SIMD128-NEXT: i32.const $push26=, -1 ; NO-SIMD128-NEXT: i32.xor $push17=, $14, $pop26 -; NO-SIMD128-NEXT: i32.and $push18=, $6, $pop17 +; NO-SIMD128-NEXT: i32.and $push18=, $pop17, $6 ; NO-SIMD128-NEXT: i32.store16 0($pop20), $pop18 ; NO-SIMD128-NEXT: i32.const $push23=, 6 ; NO-SIMD128-NEXT: i32.add $push24=, $0, $pop23 ; NO-SIMD128-NEXT: i32.const $push25=, -1 ; NO-SIMD128-NEXT: i32.xor $push21=, $12, $pop25 -; NO-SIMD128-NEXT: i32.and $push22=, $4, $pop21 +; NO-SIMD128-NEXT: i32.and $push22=, $pop21, $4 ; NO-SIMD128-NEXT: i32.store16 0($pop24), $pop22 ; NO-SIMD128-NEXT: return ; @@ -8994,43 +9313,43 @@ ; NO-SIMD128-FAST-NEXT: # %bb.0: ; NO-SIMD128-FAST-NEXT: i32.const $push0=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push1=, $9, $pop0 -; NO-SIMD128-FAST-NEXT: i32.and $push2=, $1, $pop1 +; NO-SIMD128-FAST-NEXT: i32.and $push2=, $pop1, $1 ; NO-SIMD128-FAST-NEXT: i32.store16 0($0), $pop2 ; NO-SIMD128-FAST-NEXT: i32.const $push31=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push3=, $10, $pop31 -; NO-SIMD128-FAST-NEXT: i32.and $push4=, $2, $pop3 +; NO-SIMD128-FAST-NEXT: i32.and $push4=, $pop3, $2 ; NO-SIMD128-FAST-NEXT: i32.store16 2($0), $pop4 ; NO-SIMD128-FAST-NEXT: i32.const $push30=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push5=, $11, $pop30 -; NO-SIMD128-FAST-NEXT: i32.and $push6=, $3, $pop5 +; NO-SIMD128-FAST-NEXT: i32.and $push6=, $pop5, $3 ; NO-SIMD128-FAST-NEXT: i32.store16 4($0), $pop6 ; NO-SIMD128-FAST-NEXT: i32.const $push7=, 6 ; NO-SIMD128-FAST-NEXT: i32.add $push8=, $0, $pop7 ; NO-SIMD128-FAST-NEXT: i32.const $push29=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push9=, $12, $pop29 -; NO-SIMD128-FAST-NEXT: i32.and $push10=, $4, $pop9 +; NO-SIMD128-FAST-NEXT: i32.and $push10=, $pop9, $4 ; NO-SIMD128-FAST-NEXT: i32.store16 0($pop8), $pop10 ; NO-SIMD128-FAST-NEXT: i32.const $push28=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push11=, $13, $pop28 -; NO-SIMD128-FAST-NEXT: i32.and $push12=, $5, $pop11 +; NO-SIMD128-FAST-NEXT: i32.and $push12=, $pop11, $5 ; NO-SIMD128-FAST-NEXT: i32.store16 8($0), $pop12 ; NO-SIMD128-FAST-NEXT: i32.const $push13=, 10 ; NO-SIMD128-FAST-NEXT: i32.add $push14=, $0, $pop13 ; NO-SIMD128-FAST-NEXT: i32.const $push27=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push15=, $14, $pop27 -; NO-SIMD128-FAST-NEXT: i32.and $push16=, $6, $pop15 +; NO-SIMD128-FAST-NEXT: i32.and $push16=, $pop15, $6 ; NO-SIMD128-FAST-NEXT: i32.store16 0($pop14), $pop16 ; NO-SIMD128-FAST-NEXT: i32.const $push17=, 12 ; NO-SIMD128-FAST-NEXT: i32.add $push18=, $0, $pop17 ; NO-SIMD128-FAST-NEXT: i32.const $push26=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push19=, $15, $pop26 -; NO-SIMD128-FAST-NEXT: i32.and $push20=, $7, $pop19 +; NO-SIMD128-FAST-NEXT: i32.and $push20=, $pop19, $7 ; NO-SIMD128-FAST-NEXT: i32.store16 0($pop18), $pop20 ; NO-SIMD128-FAST-NEXT: i32.const $push21=, 14 ; NO-SIMD128-FAST-NEXT: i32.add $push22=, $0, $pop21 ; NO-SIMD128-FAST-NEXT: i32.const $push25=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push23=, $16, $pop25 -; NO-SIMD128-FAST-NEXT: i32.and $push24=, $8, $pop23 +; NO-SIMD128-FAST-NEXT: i32.and $push24=, $pop23, $8 ; NO-SIMD128-FAST-NEXT: i32.store16 0($pop22), $pop24 ; NO-SIMD128-FAST-NEXT: return %inv_y = xor <8 x i16> %y, @@ -9051,7 +9370,7 @@ ; SIMD128-FAST-NEXT: # %bb.0: ; SIMD128-FAST-NEXT: v128.and $push0=, $1, $0 ; SIMD128-FAST-NEXT: v128.not $push2=, $0 -; SIMD128-FAST-NEXT: v128.and $push3=, $2, $pop2 +; SIMD128-FAST-NEXT: v128.and $push3=, $pop2, $2 ; SIMD128-FAST-NEXT: v128.or $push1=, $pop0, $pop3 ; SIMD128-FAST-NEXT: return $pop1 ; @@ -9063,7 +9382,7 @@ ; NO-SIMD128-NEXT: i32.and $push0=, $16, $8 ; NO-SIMD128-NEXT: i32.const $push1=, -1 ; NO-SIMD128-NEXT: i32.xor $push2=, $8, $pop1 -; NO-SIMD128-NEXT: i32.and $push3=, $24, $pop2 +; NO-SIMD128-NEXT: i32.and $push3=, $pop2, $24 ; NO-SIMD128-NEXT: i32.or $push4=, $pop0, $pop3 ; NO-SIMD128-NEXT: i32.store16 0($pop6), $pop4 ; NO-SIMD128-NEXT: i32.const $push11=, 12 @@ -9071,7 +9390,7 @@ ; NO-SIMD128-NEXT: i32.and $push7=, $15, $7 ; NO-SIMD128-NEXT: i32.const $push47=, -1 ; NO-SIMD128-NEXT: i32.xor $push8=, $7, $pop47 -; NO-SIMD128-NEXT: i32.and $push9=, $23, $pop8 +; NO-SIMD128-NEXT: i32.and $push9=, $pop8, $23 ; NO-SIMD128-NEXT: i32.or $push10=, $pop7, $pop9 ; NO-SIMD128-NEXT: i32.store16 0($pop12), $pop10 ; NO-SIMD128-NEXT: i32.const $push17=, 10 @@ -9079,13 +9398,13 @@ ; NO-SIMD128-NEXT: i32.and $push13=, $14, $6 ; NO-SIMD128-NEXT: i32.const $push46=, -1 ; NO-SIMD128-NEXT: i32.xor $push14=, $6, $pop46 -; NO-SIMD128-NEXT: i32.and $push15=, $22, $pop14 +; NO-SIMD128-NEXT: i32.and $push15=, $pop14, $22 ; NO-SIMD128-NEXT: i32.or $push16=, $pop13, $pop15 ; NO-SIMD128-NEXT: i32.store16 0($pop18), $pop16 ; NO-SIMD128-NEXT: i32.and $push19=, $13, $5 ; NO-SIMD128-NEXT: i32.const $push45=, -1 ; NO-SIMD128-NEXT: i32.xor $push20=, $5, $pop45 -; NO-SIMD128-NEXT: i32.and $push21=, $21, $pop20 +; NO-SIMD128-NEXT: i32.and $push21=, $pop20, $21 ; NO-SIMD128-NEXT: i32.or $push22=, $pop19, $pop21 ; NO-SIMD128-NEXT: i32.store16 8($0), $pop22 ; NO-SIMD128-NEXT: i32.const $push27=, 6 @@ -9093,25 +9412,25 @@ ; NO-SIMD128-NEXT: i32.and $push23=, $12, $4 ; NO-SIMD128-NEXT: i32.const $push44=, -1 ; NO-SIMD128-NEXT: i32.xor $push24=, $4, $pop44 -; NO-SIMD128-NEXT: i32.and $push25=, $20, $pop24 +; NO-SIMD128-NEXT: i32.and $push25=, $pop24, $20 ; NO-SIMD128-NEXT: i32.or $push26=, $pop23, $pop25 ; NO-SIMD128-NEXT: i32.store16 0($pop28), $pop26 ; NO-SIMD128-NEXT: i32.and $push29=, $11, $3 ; NO-SIMD128-NEXT: i32.const $push43=, -1 ; NO-SIMD128-NEXT: i32.xor $push30=, $3, $pop43 -; NO-SIMD128-NEXT: i32.and $push31=, $19, $pop30 +; NO-SIMD128-NEXT: i32.and $push31=, $pop30, $19 ; NO-SIMD128-NEXT: i32.or $push32=, $pop29, $pop31 ; NO-SIMD128-NEXT: i32.store16 4($0), $pop32 ; NO-SIMD128-NEXT: i32.and $push33=, $10, $2 ; NO-SIMD128-NEXT: i32.const $push42=, -1 ; NO-SIMD128-NEXT: i32.xor $push34=, $2, $pop42 -; NO-SIMD128-NEXT: i32.and $push35=, $18, $pop34 +; NO-SIMD128-NEXT: i32.and $push35=, $pop34, $18 ; NO-SIMD128-NEXT: i32.or $push36=, $pop33, $pop35 ; NO-SIMD128-NEXT: i32.store16 2($0), $pop36 ; NO-SIMD128-NEXT: i32.and $push37=, $9, $1 ; NO-SIMD128-NEXT: i32.const $push41=, -1 ; NO-SIMD128-NEXT: i32.xor $push38=, $1, $pop41 -; NO-SIMD128-NEXT: i32.and $push39=, $17, $pop38 +; NO-SIMD128-NEXT: i32.and $push39=, $pop38, $17 ; NO-SIMD128-NEXT: i32.or $push40=, $pop37, $pop39 ; NO-SIMD128-NEXT: i32.store16 0($0), $pop40 ; NO-SIMD128-NEXT: return @@ -9122,19 +9441,19 @@ ; NO-SIMD128-FAST-NEXT: i32.and $push0=, $9, $1 ; NO-SIMD128-FAST-NEXT: i32.const $push1=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push2=, $1, $pop1 -; NO-SIMD128-FAST-NEXT: i32.and $push3=, $17, $pop2 +; NO-SIMD128-FAST-NEXT: i32.and $push3=, $pop2, $17 ; NO-SIMD128-FAST-NEXT: i32.or $push4=, $pop0, $pop3 ; NO-SIMD128-FAST-NEXT: i32.store16 0($0), $pop4 ; NO-SIMD128-FAST-NEXT: i32.and $push5=, $10, $2 ; NO-SIMD128-FAST-NEXT: i32.const $push47=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push6=, $2, $pop47 -; NO-SIMD128-FAST-NEXT: i32.and $push7=, $18, $pop6 +; NO-SIMD128-FAST-NEXT: i32.and $push7=, $pop6, $18 ; NO-SIMD128-FAST-NEXT: i32.or $push8=, $pop5, $pop7 ; NO-SIMD128-FAST-NEXT: i32.store16 2($0), $pop8 ; NO-SIMD128-FAST-NEXT: i32.and $push9=, $11, $3 ; NO-SIMD128-FAST-NEXT: i32.const $push46=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push10=, $3, $pop46 -; NO-SIMD128-FAST-NEXT: i32.and $push11=, $19, $pop10 +; NO-SIMD128-FAST-NEXT: i32.and $push11=, $pop10, $19 ; NO-SIMD128-FAST-NEXT: i32.or $push12=, $pop9, $pop11 ; NO-SIMD128-FAST-NEXT: i32.store16 4($0), $pop12 ; NO-SIMD128-FAST-NEXT: i32.const $push17=, 6 @@ -9142,13 +9461,13 @@ ; NO-SIMD128-FAST-NEXT: i32.and $push13=, $12, $4 ; NO-SIMD128-FAST-NEXT: i32.const $push45=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push14=, $4, $pop45 -; NO-SIMD128-FAST-NEXT: i32.and $push15=, $20, $pop14 +; NO-SIMD128-FAST-NEXT: i32.and $push15=, $pop14, $20 ; NO-SIMD128-FAST-NEXT: i32.or $push16=, $pop13, $pop15 ; NO-SIMD128-FAST-NEXT: i32.store16 0($pop18), $pop16 ; NO-SIMD128-FAST-NEXT: i32.and $push19=, $13, $5 ; NO-SIMD128-FAST-NEXT: i32.const $push44=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push20=, $5, $pop44 -; NO-SIMD128-FAST-NEXT: i32.and $push21=, $21, $pop20 +; NO-SIMD128-FAST-NEXT: i32.and $push21=, $pop20, $21 ; NO-SIMD128-FAST-NEXT: i32.or $push22=, $pop19, $pop21 ; NO-SIMD128-FAST-NEXT: i32.store16 8($0), $pop22 ; NO-SIMD128-FAST-NEXT: i32.const $push27=, 10 @@ -9156,7 +9475,7 @@ ; NO-SIMD128-FAST-NEXT: i32.and $push23=, $14, $6 ; NO-SIMD128-FAST-NEXT: i32.const $push43=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push24=, $6, $pop43 -; NO-SIMD128-FAST-NEXT: i32.and $push25=, $22, $pop24 +; NO-SIMD128-FAST-NEXT: i32.and $push25=, $pop24, $22 ; NO-SIMD128-FAST-NEXT: i32.or $push26=, $pop23, $pop25 ; NO-SIMD128-FAST-NEXT: i32.store16 0($pop28), $pop26 ; NO-SIMD128-FAST-NEXT: i32.const $push33=, 12 @@ -9164,7 +9483,7 @@ ; NO-SIMD128-FAST-NEXT: i32.and $push29=, $15, $7 ; NO-SIMD128-FAST-NEXT: i32.const $push42=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push30=, $7, $pop42 -; NO-SIMD128-FAST-NEXT: i32.and $push31=, $23, $pop30 +; NO-SIMD128-FAST-NEXT: i32.and $push31=, $pop30, $23 ; NO-SIMD128-FAST-NEXT: i32.or $push32=, $pop29, $pop31 ; NO-SIMD128-FAST-NEXT: i32.store16 0($pop34), $pop32 ; NO-SIMD128-FAST-NEXT: i32.const $push39=, 14 @@ -9172,7 +9491,7 @@ ; NO-SIMD128-FAST-NEXT: i32.and $push35=, $16, $8 ; NO-SIMD128-FAST-NEXT: i32.const $push41=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push36=, $8, $pop41 -; NO-SIMD128-FAST-NEXT: i32.and $push37=, $24, $pop36 +; NO-SIMD128-FAST-NEXT: i32.and $push37=, $pop36, $24 ; NO-SIMD128-FAST-NEXT: i32.or $push38=, $pop35, $pop37 ; NO-SIMD128-FAST-NEXT: i32.store16 0($pop40), $pop38 ; NO-SIMD128-FAST-NEXT: return @@ -9305,132 +9624,99 @@ ; SIMD128-FAST-LABEL: bitselect_xor_reversed_v8i16: ; SIMD128-FAST: .functype bitselect_xor_reversed_v8i16 (v128, v128, v128) -> (v128) ; SIMD128-FAST-NEXT: # %bb.0: -; SIMD128-FAST-NEXT: v128.xor $push1=, $1, $2 -; SIMD128-FAST-NEXT: v128.not $push2=, $0 -; SIMD128-FAST-NEXT: v128.and $push3=, $pop1, $pop2 -; SIMD128-FAST-NEXT: v128.xor $push0=, $pop3, $2 +; SIMD128-FAST-NEXT: v128.xor $push2=, $1, $2 +; SIMD128-FAST-NEXT: v128.and $push1=, $pop2, $0 +; SIMD128-FAST-NEXT: v128.xor $push0=, $pop1, $1 ; SIMD128-FAST-NEXT: return $pop0 ; ; NO-SIMD128-LABEL: bitselect_xor_reversed_v8i16: ; NO-SIMD128: .functype bitselect_xor_reversed_v8i16 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> () ; NO-SIMD128-NEXT: # %bb.0: -; NO-SIMD128-NEXT: i32.const $push5=, 14 -; NO-SIMD128-NEXT: i32.add $push6=, $0, $pop5 -; NO-SIMD128-NEXT: i32.xor $push2=, $16, $24 -; NO-SIMD128-NEXT: i32.const $push0=, -1 -; NO-SIMD128-NEXT: i32.xor $push1=, $8, $pop0 -; NO-SIMD128-NEXT: i32.and $push3=, $pop2, $pop1 -; NO-SIMD128-NEXT: i32.xor $push4=, $pop3, $24 -; NO-SIMD128-NEXT: i32.store16 0($pop6), $pop4 -; NO-SIMD128-NEXT: i32.const $push11=, 12 -; NO-SIMD128-NEXT: i32.add $push12=, $0, $pop11 -; NO-SIMD128-NEXT: i32.xor $push8=, $15, $23 -; NO-SIMD128-NEXT: i32.const $push47=, -1 -; NO-SIMD128-NEXT: i32.xor $push7=, $7, $pop47 -; NO-SIMD128-NEXT: i32.and $push9=, $pop8, $pop7 -; NO-SIMD128-NEXT: i32.xor $push10=, $pop9, $23 -; NO-SIMD128-NEXT: i32.store16 0($pop12), $pop10 -; NO-SIMD128-NEXT: i32.const $push17=, 10 -; NO-SIMD128-NEXT: i32.add $push18=, $0, $pop17 -; NO-SIMD128-NEXT: i32.xor $push14=, $14, $22 -; NO-SIMD128-NEXT: i32.const $push46=, -1 -; NO-SIMD128-NEXT: i32.xor $push13=, $6, $pop46 -; NO-SIMD128-NEXT: i32.and $push15=, $pop14, $pop13 -; NO-SIMD128-NEXT: i32.xor $push16=, $pop15, $22 -; NO-SIMD128-NEXT: i32.store16 0($pop18), $pop16 -; NO-SIMD128-NEXT: i32.xor $push20=, $13, $21 -; NO-SIMD128-NEXT: i32.const $push45=, -1 -; NO-SIMD128-NEXT: i32.xor $push19=, $5, $pop45 -; NO-SIMD128-NEXT: i32.and $push21=, $pop20, $pop19 -; NO-SIMD128-NEXT: i32.xor $push22=, $pop21, $21 -; NO-SIMD128-NEXT: i32.store16 8($0), $pop22 -; NO-SIMD128-NEXT: i32.const $push27=, 6 -; NO-SIMD128-NEXT: i32.add $push28=, $0, $pop27 -; NO-SIMD128-NEXT: i32.xor $push24=, $12, $20 -; NO-SIMD128-NEXT: i32.const $push44=, -1 -; NO-SIMD128-NEXT: i32.xor $push23=, $4, $pop44 -; NO-SIMD128-NEXT: i32.and $push25=, $pop24, $pop23 -; NO-SIMD128-NEXT: i32.xor $push26=, $pop25, $20 -; NO-SIMD128-NEXT: i32.store16 0($pop28), $pop26 -; NO-SIMD128-NEXT: i32.xor $push30=, $11, $19 -; NO-SIMD128-NEXT: i32.const $push43=, -1 -; NO-SIMD128-NEXT: i32.xor $push29=, $3, $pop43 -; NO-SIMD128-NEXT: i32.and $push31=, $pop30, $pop29 -; NO-SIMD128-NEXT: i32.xor $push32=, $pop31, $19 -; NO-SIMD128-NEXT: i32.store16 4($0), $pop32 -; NO-SIMD128-NEXT: i32.xor $push34=, $10, $18 -; NO-SIMD128-NEXT: i32.const $push42=, -1 -; NO-SIMD128-NEXT: i32.xor $push33=, $2, $pop42 -; NO-SIMD128-NEXT: i32.and $push35=, $pop34, $pop33 -; NO-SIMD128-NEXT: i32.xor $push36=, $pop35, $18 -; NO-SIMD128-NEXT: i32.store16 2($0), $pop36 -; NO-SIMD128-NEXT: i32.xor $push38=, $9, $17 -; NO-SIMD128-NEXT: i32.const $push41=, -1 -; NO-SIMD128-NEXT: i32.xor $push37=, $1, $pop41 -; NO-SIMD128-NEXT: i32.and $push39=, $pop38, $pop37 -; NO-SIMD128-NEXT: i32.xor $push40=, $pop39, $17 -; NO-SIMD128-NEXT: i32.store16 0($0), $pop40 +; NO-SIMD128-NEXT: i32.const $push3=, 14 +; NO-SIMD128-NEXT: i32.add $push4=, $0, $pop3 +; NO-SIMD128-NEXT: i32.xor $push0=, $16, $24 +; NO-SIMD128-NEXT: i32.and $push1=, $pop0, $8 +; NO-SIMD128-NEXT: i32.xor $push2=, $pop1, $16 +; NO-SIMD128-NEXT: i32.store16 0($pop4), $pop2 +; NO-SIMD128-NEXT: i32.const $push8=, 12 +; NO-SIMD128-NEXT: i32.add $push9=, $0, $pop8 +; NO-SIMD128-NEXT: i32.xor $push5=, $15, $23 +; NO-SIMD128-NEXT: i32.and $push6=, $pop5, $7 +; NO-SIMD128-NEXT: i32.xor $push7=, $pop6, $15 +; NO-SIMD128-NEXT: i32.store16 0($pop9), $pop7 +; NO-SIMD128-NEXT: i32.const $push13=, 10 +; NO-SIMD128-NEXT: i32.add $push14=, $0, $pop13 +; NO-SIMD128-NEXT: i32.xor $push10=, $14, $22 +; NO-SIMD128-NEXT: i32.and $push11=, $pop10, $6 +; NO-SIMD128-NEXT: i32.xor $push12=, $pop11, $14 +; NO-SIMD128-NEXT: i32.store16 0($pop14), $pop12 +; NO-SIMD128-NEXT: i32.xor $push15=, $13, $21 +; NO-SIMD128-NEXT: i32.and $push16=, $pop15, $5 +; NO-SIMD128-NEXT: i32.xor $push17=, $pop16, $13 +; NO-SIMD128-NEXT: i32.store16 8($0), $pop17 +; NO-SIMD128-NEXT: i32.const $push21=, 6 +; NO-SIMD128-NEXT: i32.add $push22=, $0, $pop21 +; NO-SIMD128-NEXT: i32.xor $push18=, $12, $20 +; NO-SIMD128-NEXT: i32.and $push19=, $pop18, $4 +; NO-SIMD128-NEXT: i32.xor $push20=, $pop19, $12 +; NO-SIMD128-NEXT: i32.store16 0($pop22), $pop20 +; NO-SIMD128-NEXT: i32.xor $push23=, $11, $19 +; NO-SIMD128-NEXT: i32.and $push24=, $pop23, $3 +; NO-SIMD128-NEXT: i32.xor $push25=, $pop24, $11 +; NO-SIMD128-NEXT: i32.store16 4($0), $pop25 +; NO-SIMD128-NEXT: i32.xor $push26=, $10, $18 +; NO-SIMD128-NEXT: i32.and $push27=, $pop26, $2 +; NO-SIMD128-NEXT: i32.xor $push28=, $pop27, $10 +; NO-SIMD128-NEXT: i32.store16 2($0), $pop28 +; NO-SIMD128-NEXT: i32.xor $push29=, $9, $17 +; NO-SIMD128-NEXT: i32.and $push30=, $pop29, $1 +; NO-SIMD128-NEXT: i32.xor $push31=, $pop30, $9 +; NO-SIMD128-NEXT: i32.store16 0($0), $pop31 ; NO-SIMD128-NEXT: return ; ; NO-SIMD128-FAST-LABEL: bitselect_xor_reversed_v8i16: ; NO-SIMD128-FAST: .functype bitselect_xor_reversed_v8i16 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> () ; NO-SIMD128-FAST-NEXT: # %bb.0: -; NO-SIMD128-FAST-NEXT: i32.xor $push2=, $9, $17 -; NO-SIMD128-FAST-NEXT: i32.const $push0=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push1=, $1, $pop0 -; NO-SIMD128-FAST-NEXT: i32.and $push3=, $pop2, $pop1 -; NO-SIMD128-FAST-NEXT: i32.xor $push4=, $pop3, $17 -; NO-SIMD128-FAST-NEXT: i32.store16 0($0), $pop4 -; NO-SIMD128-FAST-NEXT: i32.xor $push6=, $10, $18 -; NO-SIMD128-FAST-NEXT: i32.const $push47=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push5=, $2, $pop47 -; NO-SIMD128-FAST-NEXT: i32.and $push7=, $pop6, $pop5 -; NO-SIMD128-FAST-NEXT: i32.xor $push8=, $pop7, $18 -; NO-SIMD128-FAST-NEXT: i32.store16 2($0), $pop8 -; NO-SIMD128-FAST-NEXT: i32.xor $push10=, $11, $19 -; NO-SIMD128-FAST-NEXT: i32.const $push46=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push9=, $3, $pop46 -; NO-SIMD128-FAST-NEXT: i32.and $push11=, $pop10, $pop9 -; NO-SIMD128-FAST-NEXT: i32.xor $push12=, $pop11, $19 -; NO-SIMD128-FAST-NEXT: i32.store16 4($0), $pop12 -; NO-SIMD128-FAST-NEXT: i32.const $push17=, 6 +; NO-SIMD128-FAST-NEXT: i32.xor $push0=, $9, $17 +; NO-SIMD128-FAST-NEXT: i32.and $push1=, $pop0, $1 +; NO-SIMD128-FAST-NEXT: i32.xor $push2=, $pop1, $9 +; NO-SIMD128-FAST-NEXT: i32.store16 0($0), $pop2 +; NO-SIMD128-FAST-NEXT: i32.xor $push3=, $10, $18 +; NO-SIMD128-FAST-NEXT: i32.and $push4=, $pop3, $2 +; NO-SIMD128-FAST-NEXT: i32.xor $push5=, $pop4, $10 +; NO-SIMD128-FAST-NEXT: i32.store16 2($0), $pop5 +; NO-SIMD128-FAST-NEXT: i32.xor $push6=, $11, $19 +; NO-SIMD128-FAST-NEXT: i32.and $push7=, $pop6, $3 +; NO-SIMD128-FAST-NEXT: i32.xor $push8=, $pop7, $11 +; NO-SIMD128-FAST-NEXT: i32.store16 4($0), $pop8 +; NO-SIMD128-FAST-NEXT: i32.const $push9=, 6 +; NO-SIMD128-FAST-NEXT: i32.add $push10=, $0, $pop9 +; NO-SIMD128-FAST-NEXT: i32.xor $push11=, $12, $20 +; NO-SIMD128-FAST-NEXT: i32.and $push12=, $pop11, $4 +; NO-SIMD128-FAST-NEXT: i32.xor $push13=, $pop12, $12 +; NO-SIMD128-FAST-NEXT: i32.store16 0($pop10), $pop13 +; NO-SIMD128-FAST-NEXT: i32.xor $push14=, $13, $21 +; NO-SIMD128-FAST-NEXT: i32.and $push15=, $pop14, $5 +; NO-SIMD128-FAST-NEXT: i32.xor $push16=, $pop15, $13 +; NO-SIMD128-FAST-NEXT: i32.store16 8($0), $pop16 +; NO-SIMD128-FAST-NEXT: i32.const $push17=, 10 ; NO-SIMD128-FAST-NEXT: i32.add $push18=, $0, $pop17 -; NO-SIMD128-FAST-NEXT: i32.xor $push14=, $12, $20 -; NO-SIMD128-FAST-NEXT: i32.const $push45=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push13=, $4, $pop45 -; NO-SIMD128-FAST-NEXT: i32.and $push15=, $pop14, $pop13 -; NO-SIMD128-FAST-NEXT: i32.xor $push16=, $pop15, $20 -; NO-SIMD128-FAST-NEXT: i32.store16 0($pop18), $pop16 -; NO-SIMD128-FAST-NEXT: i32.xor $push20=, $13, $21 -; NO-SIMD128-FAST-NEXT: i32.const $push44=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push19=, $5, $pop44 -; NO-SIMD128-FAST-NEXT: i32.and $push21=, $pop20, $pop19 -; NO-SIMD128-FAST-NEXT: i32.xor $push22=, $pop21, $21 -; NO-SIMD128-FAST-NEXT: i32.store16 8($0), $pop22 -; NO-SIMD128-FAST-NEXT: i32.const $push27=, 10 +; NO-SIMD128-FAST-NEXT: i32.xor $push19=, $14, $22 +; NO-SIMD128-FAST-NEXT: i32.and $push20=, $pop19, $6 +; NO-SIMD128-FAST-NEXT: i32.xor $push21=, $pop20, $14 +; NO-SIMD128-FAST-NEXT: i32.store16 0($pop18), $pop21 +; NO-SIMD128-FAST-NEXT: i32.const $push22=, 12 +; NO-SIMD128-FAST-NEXT: i32.add $push23=, $0, $pop22 +; NO-SIMD128-FAST-NEXT: i32.xor $push24=, $15, $23 +; NO-SIMD128-FAST-NEXT: i32.and $push25=, $pop24, $7 +; NO-SIMD128-FAST-NEXT: i32.xor $push26=, $pop25, $15 +; NO-SIMD128-FAST-NEXT: i32.store16 0($pop23), $pop26 +; NO-SIMD128-FAST-NEXT: i32.const $push27=, 14 ; NO-SIMD128-FAST-NEXT: i32.add $push28=, $0, $pop27 -; NO-SIMD128-FAST-NEXT: i32.xor $push24=, $14, $22 -; NO-SIMD128-FAST-NEXT: i32.const $push43=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push23=, $6, $pop43 -; NO-SIMD128-FAST-NEXT: i32.and $push25=, $pop24, $pop23 -; NO-SIMD128-FAST-NEXT: i32.xor $push26=, $pop25, $22 -; NO-SIMD128-FAST-NEXT: i32.store16 0($pop28), $pop26 -; NO-SIMD128-FAST-NEXT: i32.const $push33=, 12 -; NO-SIMD128-FAST-NEXT: i32.add $push34=, $0, $pop33 -; NO-SIMD128-FAST-NEXT: i32.xor $push30=, $15, $23 -; NO-SIMD128-FAST-NEXT: i32.const $push42=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push29=, $7, $pop42 -; NO-SIMD128-FAST-NEXT: i32.and $push31=, $pop30, $pop29 -; NO-SIMD128-FAST-NEXT: i32.xor $push32=, $pop31, $23 -; NO-SIMD128-FAST-NEXT: i32.store16 0($pop34), $pop32 -; NO-SIMD128-FAST-NEXT: i32.const $push39=, 14 -; NO-SIMD128-FAST-NEXT: i32.add $push40=, $0, $pop39 -; NO-SIMD128-FAST-NEXT: i32.xor $push36=, $16, $24 -; NO-SIMD128-FAST-NEXT: i32.const $push41=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push35=, $8, $pop41 -; NO-SIMD128-FAST-NEXT: i32.and $push37=, $pop36, $pop35 -; NO-SIMD128-FAST-NEXT: i32.xor $push38=, $pop37, $24 -; NO-SIMD128-FAST-NEXT: i32.store16 0($pop40), $pop38 +; NO-SIMD128-FAST-NEXT: i32.xor $push29=, $16, $24 +; NO-SIMD128-FAST-NEXT: i32.and $push30=, $pop29, $8 +; NO-SIMD128-FAST-NEXT: i32.xor $push31=, $pop30, $16 +; NO-SIMD128-FAST-NEXT: i32.store16 0($pop28), $pop31 ; NO-SIMD128-FAST-NEXT: return %xor1 = xor <8 x i16> %v1, %v2 %notc = xor <8 x i16> %c, (v128) ; SIMD128-FAST-NEXT: # %bb.0: ; SIMD128-FAST-NEXT: v128.not $push0=, $1 -; SIMD128-FAST-NEXT: v128.and $push1=, $0, $pop0 +; SIMD128-FAST-NEXT: v128.and $push1=, $pop0, $0 ; SIMD128-FAST-NEXT: return $pop1 ; ; NO-SIMD128-LABEL: andnot_v4i32: @@ -11097,21 +11383,21 @@ ; NO-SIMD128-NEXT: # %bb.0: ; NO-SIMD128-NEXT: i32.const $push0=, -1 ; NO-SIMD128-NEXT: i32.xor $push1=, $7, $pop0 -; NO-SIMD128-NEXT: i32.and $push2=, $3, $pop1 +; NO-SIMD128-NEXT: i32.and $push2=, $pop1, $3 ; NO-SIMD128-NEXT: i32.store 8($0), $pop2 ; NO-SIMD128-NEXT: i32.const $push13=, -1 ; NO-SIMD128-NEXT: i32.xor $push3=, $6, $pop13 -; NO-SIMD128-NEXT: i32.and $push4=, $2, $pop3 +; NO-SIMD128-NEXT: i32.and $push4=, $pop3, $2 ; NO-SIMD128-NEXT: i32.store 4($0), $pop4 ; NO-SIMD128-NEXT: i32.const $push12=, -1 ; NO-SIMD128-NEXT: i32.xor $push5=, $5, $pop12 -; NO-SIMD128-NEXT: i32.and $push6=, $1, $pop5 +; NO-SIMD128-NEXT: i32.and $push6=, $pop5, $1 ; NO-SIMD128-NEXT: i32.store 0($0), $pop6 ; NO-SIMD128-NEXT: i32.const $push9=, 12 ; NO-SIMD128-NEXT: i32.add $push10=, $0, $pop9 ; NO-SIMD128-NEXT: i32.const $push11=, -1 ; NO-SIMD128-NEXT: i32.xor $push7=, $8, $pop11 -; NO-SIMD128-NEXT: i32.and $push8=, $4, $pop7 +; NO-SIMD128-NEXT: i32.and $push8=, $pop7, $4 ; NO-SIMD128-NEXT: i32.store 0($pop10), $pop8 ; NO-SIMD128-NEXT: return ; @@ -11120,21 +11406,21 @@ ; NO-SIMD128-FAST-NEXT: # %bb.0: ; NO-SIMD128-FAST-NEXT: i32.const $push0=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push1=, $5, $pop0 -; NO-SIMD128-FAST-NEXT: i32.and $push2=, $1, $pop1 +; NO-SIMD128-FAST-NEXT: i32.and $push2=, $pop1, $1 ; NO-SIMD128-FAST-NEXT: i32.store 0($0), $pop2 ; NO-SIMD128-FAST-NEXT: i32.const $push13=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push3=, $6, $pop13 -; NO-SIMD128-FAST-NEXT: i32.and $push4=, $2, $pop3 +; NO-SIMD128-FAST-NEXT: i32.and $push4=, $pop3, $2 ; NO-SIMD128-FAST-NEXT: i32.store 4($0), $pop4 ; NO-SIMD128-FAST-NEXT: i32.const $push12=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push5=, $7, $pop12 -; NO-SIMD128-FAST-NEXT: i32.and $push6=, $3, $pop5 +; NO-SIMD128-FAST-NEXT: i32.and $push6=, $pop5, $3 ; NO-SIMD128-FAST-NEXT: i32.store 8($0), $pop6 ; NO-SIMD128-FAST-NEXT: i32.const $push7=, 12 ; NO-SIMD128-FAST-NEXT: i32.add $push8=, $0, $pop7 ; NO-SIMD128-FAST-NEXT: i32.const $push11=, -1 ; NO-SIMD128-FAST-NEXT: i32.xor $push9=, $8, $pop11 -; NO-SIMD128-FAST-NEXT: i32.and $push10=, $4, $pop9 +; NO-SIMD128-FAST-NEXT: i32.and $push10=, $pop9, $4 ; NO-SIMD128-FAST-NEXT: i32.store 0($pop8), $pop10 ; NO-SIMD128-FAST-NEXT: return %inv_y = xor <4 x i32> %y, @@ -11302,72 +11588,55 @@ ; SIMD128-FAST-LABEL: bitselect_xor_reversed_v4i32: ; SIMD128-FAST: .functype bitselect_xor_reversed_v4i32 (v128, v128, v128) -> (v128) ; SIMD128-FAST-NEXT: # %bb.0: -; SIMD128-FAST-NEXT: v128.xor $push1=, $1, $2 -; SIMD128-FAST-NEXT: v128.not $push2=, $0 -; SIMD128-FAST-NEXT: v128.and $push3=, $pop1, $pop2 -; SIMD128-FAST-NEXT: v128.xor $push0=, $pop3, $2 +; SIMD128-FAST-NEXT: v128.xor $push2=, $1, $2 +; SIMD128-FAST-NEXT: v128.and $push1=, $pop2, $0 +; SIMD128-FAST-NEXT: v128.xor $push0=, $pop1, $1 ; SIMD128-FAST-NEXT: return $pop0 ; ; NO-SIMD128-LABEL: bitselect_xor_reversed_v4i32: ; NO-SIMD128: .functype bitselect_xor_reversed_v4i32 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> () ; NO-SIMD128-NEXT: # %bb.0: -; NO-SIMD128-NEXT: i32.const $push5=, 12 -; NO-SIMD128-NEXT: i32.add $push6=, $0, $pop5 -; NO-SIMD128-NEXT: i32.xor $push2=, $8, $12 -; NO-SIMD128-NEXT: i32.const $push0=, -1 -; NO-SIMD128-NEXT: i32.xor $push1=, $4, $pop0 -; NO-SIMD128-NEXT: i32.and $push3=, $pop2, $pop1 -; NO-SIMD128-NEXT: i32.xor $push4=, $pop3, $12 -; NO-SIMD128-NEXT: i32.store 0($pop6), $pop4 -; NO-SIMD128-NEXT: i32.xor $push8=, $7, $11 -; NO-SIMD128-NEXT: i32.const $push21=, -1 -; NO-SIMD128-NEXT: i32.xor $push7=, $3, $pop21 -; NO-SIMD128-NEXT: i32.and $push9=, $pop8, $pop7 -; NO-SIMD128-NEXT: i32.xor $push10=, $pop9, $11 -; NO-SIMD128-NEXT: i32.store 8($0), $pop10 -; NO-SIMD128-NEXT: i32.xor $push12=, $6, $10 -; NO-SIMD128-NEXT: i32.const $push20=, -1 -; NO-SIMD128-NEXT: i32.xor $push11=, $2, $pop20 -; NO-SIMD128-NEXT: i32.and $push13=, $pop12, $pop11 -; NO-SIMD128-NEXT: i32.xor $push14=, $pop13, $10 -; NO-SIMD128-NEXT: i32.store 4($0), $pop14 -; NO-SIMD128-NEXT: i32.xor $push16=, $5, $9 -; NO-SIMD128-NEXT: i32.const $push19=, -1 -; NO-SIMD128-NEXT: i32.xor $push15=, $1, $pop19 -; NO-SIMD128-NEXT: i32.and $push17=, $pop16, $pop15 -; NO-SIMD128-NEXT: i32.xor $push18=, $pop17, $9 -; NO-SIMD128-NEXT: i32.store 0($0), $pop18 +; NO-SIMD128-NEXT: i32.const $push3=, 12 +; NO-SIMD128-NEXT: i32.add $push4=, $0, $pop3 +; NO-SIMD128-NEXT: i32.xor $push0=, $8, $12 +; NO-SIMD128-NEXT: i32.and $push1=, $pop0, $4 +; NO-SIMD128-NEXT: i32.xor $push2=, $pop1, $8 +; NO-SIMD128-NEXT: i32.store 0($pop4), $pop2 +; NO-SIMD128-NEXT: i32.xor $push5=, $7, $11 +; NO-SIMD128-NEXT: i32.and $push6=, $pop5, $3 +; NO-SIMD128-NEXT: i32.xor $push7=, $pop6, $7 +; NO-SIMD128-NEXT: i32.store 8($0), $pop7 +; NO-SIMD128-NEXT: i32.xor $push8=, $6, $10 +; NO-SIMD128-NEXT: i32.and $push9=, $pop8, $2 +; NO-SIMD128-NEXT: i32.xor $push10=, $pop9, $6 +; NO-SIMD128-NEXT: i32.store 4($0), $pop10 +; NO-SIMD128-NEXT: i32.xor $push11=, $5, $9 +; NO-SIMD128-NEXT: i32.and $push12=, $pop11, $1 +; NO-SIMD128-NEXT: i32.xor $push13=, $pop12, $5 +; NO-SIMD128-NEXT: i32.store 0($0), $pop13 ; NO-SIMD128-NEXT: return ; ; NO-SIMD128-FAST-LABEL: bitselect_xor_reversed_v4i32: ; NO-SIMD128-FAST: .functype bitselect_xor_reversed_v4i32 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> () ; NO-SIMD128-FAST-NEXT: # %bb.0: -; NO-SIMD128-FAST-NEXT: i32.xor $push2=, $5, $9 -; NO-SIMD128-FAST-NEXT: i32.const $push0=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push1=, $1, $pop0 -; NO-SIMD128-FAST-NEXT: i32.and $push3=, $pop2, $pop1 -; NO-SIMD128-FAST-NEXT: i32.xor $push4=, $pop3, $9 -; NO-SIMD128-FAST-NEXT: i32.store 0($0), $pop4 -; NO-SIMD128-FAST-NEXT: i32.xor $push6=, $6, $10 -; NO-SIMD128-FAST-NEXT: i32.const $push21=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push5=, $2, $pop21 -; NO-SIMD128-FAST-NEXT: i32.and $push7=, $pop6, $pop5 -; NO-SIMD128-FAST-NEXT: i32.xor $push8=, $pop7, $10 -; NO-SIMD128-FAST-NEXT: i32.store 4($0), $pop8 -; NO-SIMD128-FAST-NEXT: i32.xor $push10=, $7, $11 -; NO-SIMD128-FAST-NEXT: i32.const $push20=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push9=, $3, $pop20 -; NO-SIMD128-FAST-NEXT: i32.and $push11=, $pop10, $pop9 -; NO-SIMD128-FAST-NEXT: i32.xor $push12=, $pop11, $11 -; NO-SIMD128-FAST-NEXT: i32.store 8($0), $pop12 -; NO-SIMD128-FAST-NEXT: i32.const $push17=, 12 -; NO-SIMD128-FAST-NEXT: i32.add $push18=, $0, $pop17 -; NO-SIMD128-FAST-NEXT: i32.xor $push14=, $8, $12 -; NO-SIMD128-FAST-NEXT: i32.const $push19=, -1 -; NO-SIMD128-FAST-NEXT: i32.xor $push13=, $4, $pop19 -; NO-SIMD128-FAST-NEXT: i32.and $push15=, $pop14, $pop13 -; NO-SIMD128-FAST-NEXT: i32.xor $push16=, $pop15, $12 -; NO-SIMD128-FAST-NEXT: i32.store 0($pop18), $pop16 +; NO-SIMD128-FAST-NEXT: i32.xor $push0=, $5, $9 +; NO-SIMD128-FAST-NEXT: i32.and $push1=, $pop0, $1 +; NO-SIMD128-FAST-NEXT: i32.xor $push2=, $pop1, $5 +; NO-SIMD128-FAST-NEXT: i32.store 0($0), $pop2 +; NO-SIMD128-FAST-NEXT: i32.xor $push3=, $6, $10 +; NO-SIMD128-FAST-NEXT: i32.and $push4=, $pop3, $2 +; NO-SIMD128-FAST-NEXT: i32.xor $push5=, $pop4, $6 +; NO-SIMD128-FAST-NEXT: i32.store 4($0), $pop5 +; NO-SIMD128-FAST-NEXT: i32.xor $push6=, $7, $11 +; NO-SIMD128-FAST-NEXT: i32.and $push7=, $pop6, $3 +; NO-SIMD128-FAST-NEXT: i32.xor $push8=, $pop7, $7 +; NO-SIMD128-FAST-NEXT: i32.store 8($0), $pop8 +; NO-SIMD128-FAST-NEXT: i32.const $push9=, 12 +; NO-SIMD128-FAST-NEXT: i32.add $push10=, $0, $pop9 +; NO-SIMD128-FAST-NEXT: i32.xor $push11=, $8, $12 +; NO-SIMD128-FAST-NEXT: i32.and $push12=, $pop11, $4 +; NO-SIMD128-FAST-NEXT: i32.xor $push13=, $pop12, $8 +; NO-SIMD128-FAST-NEXT: i32.store 0($pop10), $pop13 ; NO-SIMD128-FAST-NEXT: return %xor1 = xor <4 x i32> %v1, %v2 %notc = xor <4 x i32> %c, @@ -12658,7 +12927,7 @@ ; SIMD128-FAST: .functype andnot_v2i64 (v128, v128) -> (v128) ; SIMD128-FAST-NEXT: # %bb.0: ; SIMD128-FAST-NEXT: v128.not $push0=, $1 -; SIMD128-FAST-NEXT: v128.and $push1=, $0, $pop0 +; SIMD128-FAST-NEXT: v128.and $push1=, $pop0, $0 ; SIMD128-FAST-NEXT: return $pop1 ; ; NO-SIMD128-LABEL: andnot_v2i64: @@ -12666,11 +12935,11 @@ ; NO-SIMD128-NEXT: # %bb.0: ; NO-SIMD128-NEXT: i64.const $push0=, -1 ; NO-SIMD128-NEXT: i64.xor $push1=, $4, $pop0 -; NO-SIMD128-NEXT: i64.and $push2=, $2, $pop1 +; NO-SIMD128-NEXT: i64.and $push2=, $pop1, $2 ; NO-SIMD128-NEXT: i64.store 8($0), $pop2 ; NO-SIMD128-NEXT: i64.const $push5=, -1 ; NO-SIMD128-NEXT: i64.xor $push3=, $3, $pop5 -; NO-SIMD128-NEXT: i64.and $push4=, $1, $pop3 +; NO-SIMD128-NEXT: i64.and $push4=, $pop3, $1 ; NO-SIMD128-NEXT: i64.store 0($0), $pop4 ; NO-SIMD128-NEXT: return ; @@ -12679,11 +12948,11 @@ ; NO-SIMD128-FAST-NEXT: # %bb.0: ; NO-SIMD128-FAST-NEXT: i64.const $push0=, -1 ; NO-SIMD128-FAST-NEXT: i64.xor $push1=, $3, $pop0 -; NO-SIMD128-FAST-NEXT: i64.and $push2=, $1, $pop1 +; NO-SIMD128-FAST-NEXT: i64.and $push2=, $pop1, $1 ; NO-SIMD128-FAST-NEXT: i64.store 0($0), $pop2 ; NO-SIMD128-FAST-NEXT: i64.const $push5=, -1 ; NO-SIMD128-FAST-NEXT: i64.xor $push3=, $4, $pop5 -; NO-SIMD128-FAST-NEXT: i64.and $push4=, $2, $pop3 +; NO-SIMD128-FAST-NEXT: i64.and $push4=, $pop3, $2 ; NO-SIMD128-FAST-NEXT: i64.store 8($0), $pop4 ; NO-SIMD128-FAST-NEXT: return %inv_y = xor <2 x i64> %y, @@ -12702,7 +12971,7 @@ ; SIMD128-FAST: .functype bitselect_v2i64 (v128, v128, v128) -> (v128) ; SIMD128-FAST-NEXT: # %bb.0: ; SIMD128-FAST-NEXT: v128.not $push2=, $0 -; SIMD128-FAST-NEXT: v128.and $push3=, $2, $pop2 +; SIMD128-FAST-NEXT: v128.and $push3=, $pop2, $2 ; SIMD128-FAST-NEXT: v128.and $push0=, $1, $0 ; SIMD128-FAST-NEXT: v128.or $push1=, $pop3, $pop0 ; SIMD128-FAST-NEXT: return $pop1 @@ -12712,13 +12981,13 @@ ; NO-SIMD128-NEXT: # %bb.0: ; NO-SIMD128-NEXT: i64.const $push1=, -1 ; NO-SIMD128-NEXT: i64.xor $push2=, $2, $pop1 -; NO-SIMD128-NEXT: i64.and $push3=, $6, $pop2 +; NO-SIMD128-NEXT: i64.and $push3=, $pop2, $6 ; NO-SIMD128-NEXT: i64.and $push0=, $4, $2 ; NO-SIMD128-NEXT: i64.or $push4=, $pop3, $pop0 ; NO-SIMD128-NEXT: i64.store 8($0), $pop4 ; NO-SIMD128-NEXT: i64.const $push9=, -1 ; NO-SIMD128-NEXT: i64.xor $push6=, $1, $pop9 -; NO-SIMD128-NEXT: i64.and $push7=, $5, $pop6 +; NO-SIMD128-NEXT: i64.and $push7=, $pop6, $5 ; NO-SIMD128-NEXT: i64.and $push5=, $3, $1 ; NO-SIMD128-NEXT: i64.or $push8=, $pop7, $pop5 ; NO-SIMD128-NEXT: i64.store 0($0), $pop8 @@ -12729,13 +12998,13 @@ ; NO-SIMD128-FAST-NEXT: # %bb.0: ; NO-SIMD128-FAST-NEXT: i64.const $push1=, -1 ; NO-SIMD128-FAST-NEXT: i64.xor $push2=, $1, $pop1 -; NO-SIMD128-FAST-NEXT: i64.and $push3=, $5, $pop2 +; NO-SIMD128-FAST-NEXT: i64.and $push3=, $pop2, $5 ; NO-SIMD128-FAST-NEXT: i64.and $push0=, $3, $1 ; NO-SIMD128-FAST-NEXT: i64.or $push4=, $pop3, $pop0 ; NO-SIMD128-FAST-NEXT: i64.store 0($0), $pop4 ; NO-SIMD128-FAST-NEXT: i64.const $push9=, -1 ; NO-SIMD128-FAST-NEXT: i64.xor $push6=, $2, $pop9 -; NO-SIMD128-FAST-NEXT: i64.and $push7=, $6, $pop6 +; NO-SIMD128-FAST-NEXT: i64.and $push7=, $pop6, $6 ; NO-SIMD128-FAST-NEXT: i64.and $push5=, $4, $2 ; NO-SIMD128-FAST-NEXT: i64.or $push8=, $pop7, $pop5 ; NO-SIMD128-FAST-NEXT: i64.store 8($0), $pop8 @@ -12803,44 +13072,35 @@ ; SIMD128-FAST-LABEL: bitselect_xor_reversed_v2i64: ; SIMD128-FAST: .functype bitselect_xor_reversed_v2i64 (v128, v128, v128) -> (v128) ; SIMD128-FAST-NEXT: # %bb.0: -; SIMD128-FAST-NEXT: v128.xor $push1=, $1, $2 -; SIMD128-FAST-NEXT: v128.not $push2=, $0 -; SIMD128-FAST-NEXT: v128.and $push3=, $pop1, $pop2 -; SIMD128-FAST-NEXT: v128.xor $push0=, $pop3, $2 +; SIMD128-FAST-NEXT: v128.xor $push2=, $1, $2 +; SIMD128-FAST-NEXT: v128.and $push1=, $pop2, $0 +; SIMD128-FAST-NEXT: v128.xor $push0=, $pop1, $1 ; SIMD128-FAST-NEXT: return $pop0 ; ; NO-SIMD128-LABEL: bitselect_xor_reversed_v2i64: ; NO-SIMD128: .functype bitselect_xor_reversed_v2i64 (i32, i64, i64, i64, i64, i64, i64) -> () ; NO-SIMD128-NEXT: # %bb.0: -; NO-SIMD128-NEXT: i64.xor $push2=, $4, $6 -; NO-SIMD128-NEXT: i64.const $push0=, -1 -; NO-SIMD128-NEXT: i64.xor $push1=, $2, $pop0 -; NO-SIMD128-NEXT: i64.and $push3=, $pop2, $pop1 -; NO-SIMD128-NEXT: i64.xor $push4=, $pop3, $6 -; NO-SIMD128-NEXT: i64.store 8($0), $pop4 -; NO-SIMD128-NEXT: i64.xor $push6=, $3, $5 -; NO-SIMD128-NEXT: i64.const $push9=, -1 -; NO-SIMD128-NEXT: i64.xor $push5=, $1, $pop9 -; NO-SIMD128-NEXT: i64.and $push7=, $pop6, $pop5 -; NO-SIMD128-NEXT: i64.xor $push8=, $pop7, $5 -; NO-SIMD128-NEXT: i64.store 0($0), $pop8 +; NO-SIMD128-NEXT: i64.xor $push0=, $4, $6 +; NO-SIMD128-NEXT: i64.and $push1=, $pop0, $2 +; NO-SIMD128-NEXT: i64.xor $push2=, $pop1, $4 +; NO-SIMD128-NEXT: i64.store 8($0), $pop2 +; NO-SIMD128-NEXT: i64.xor $push3=, $3, $5 +; NO-SIMD128-NEXT: i64.and $push4=, $pop3, $1 +; NO-SIMD128-NEXT: i64.xor $push5=, $pop4, $3 +; NO-SIMD128-NEXT: i64.store 0($0), $pop5 ; NO-SIMD128-NEXT: return ; ; NO-SIMD128-FAST-LABEL: bitselect_xor_reversed_v2i64: ; NO-SIMD128-FAST: .functype bitselect_xor_reversed_v2i64 (i32, i64, i64, i64, i64, i64, i64) -> () ; NO-SIMD128-FAST-NEXT: # %bb.0: -; NO-SIMD128-FAST-NEXT: i64.xor $push2=, $3, $5 -; NO-SIMD128-FAST-NEXT: i64.const $push0=, -1 -; NO-SIMD128-FAST-NEXT: i64.xor $push1=, $1, $pop0 -; NO-SIMD128-FAST-NEXT: i64.and $push3=, $pop2, $pop1 -; NO-SIMD128-FAST-NEXT: i64.xor $push4=, $pop3, $5 -; NO-SIMD128-FAST-NEXT: i64.store 0($0), $pop4 -; NO-SIMD128-FAST-NEXT: i64.xor $push6=, $4, $6 -; NO-SIMD128-FAST-NEXT: i64.const $push9=, -1 -; NO-SIMD128-FAST-NEXT: i64.xor $push5=, $2, $pop9 -; NO-SIMD128-FAST-NEXT: i64.and $push7=, $pop6, $pop5 -; NO-SIMD128-FAST-NEXT: i64.xor $push8=, $pop7, $6 -; NO-SIMD128-FAST-NEXT: i64.store 8($0), $pop8 +; NO-SIMD128-FAST-NEXT: i64.xor $push0=, $3, $5 +; NO-SIMD128-FAST-NEXT: i64.and $push1=, $pop0, $1 +; NO-SIMD128-FAST-NEXT: i64.xor $push2=, $pop1, $3 +; NO-SIMD128-FAST-NEXT: i64.store 0($0), $pop2 +; NO-SIMD128-FAST-NEXT: i64.xor $push3=, $4, $6 +; NO-SIMD128-FAST-NEXT: i64.and $push4=, $pop3, $2 +; NO-SIMD128-FAST-NEXT: i64.xor $push5=, $pop4, $4 +; NO-SIMD128-FAST-NEXT: i64.store 8($0), $pop5 ; NO-SIMD128-FAST-NEXT: return %xor1 = xor <2 x i64> %v1, %v2 %notc = xor <2 x i64> %c, Index: llvm/test/CodeGen/WebAssembly/simd-build-pair.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/simd-build-pair.ll +++ llvm/test/CodeGen/WebAssembly/simd-build-pair.ll @@ -14,19 +14,19 @@ ; t8: ch = store<(store 8 into `ptr undef`, align 1)> t3:1, t24, undef:i32, undef:i32 ; t9: ch = WebAssemblyISD::RETURN t8 -define void @build_pair_i32s() { +define void @build_pair_i32s(ptr %in, ptr %out) { ; CHECK-LABEL: build_pair_i32s: -; CHECK: .functype build_pair_i32s () -> () +; CHECK: .functype build_pair_i32s (i32, i32) -> () ; CHECK-NEXT: # %bb.0: # %entry -; CHECK-NEXT: v128.load $push0= -; CHECK-NEXT: i8x16.shuffle $push1= -; CHECK-NEXT: v128.store64_lane +; CHECK-NEXT: v128.load $push0=, 0($0) +; CHECK-NEXT: i8x16.shuffle $push1=, $pop0, $2, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 0, 1, 2, 3 +; CHECK-NEXT: v128.store64_lane 0($1):p2align=0, $pop1, 0 ; CHECK-NEXT: return entry: - %0 = load <4 x i32>, ptr undef, align 16 - %shuffle.i184 = shufflevector <4 x i32> %0, <4 x i32> undef, <4 x i32> + %load = load <4 x i32>, ptr %in, align 16 + %shuffle.i184 = shufflevector <4 x i32> %load, <4 x i32> undef, <4 x i32> %bc357 = bitcast <4 x i32> %shuffle.i184 to <2 x i64> - %1 = extractelement <2 x i64> %bc357, i32 0 - store i64 %1, ptr undef, align 1 + %extract = extractelement <2 x i64> %bc357, i32 0 + store i64 %extract, ptr %out, align 1 ret void } Index: llvm/test/CodeGen/WebAssembly/simd-build-vector.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/simd-build-vector.ll +++ llvm/test/CodeGen/WebAssembly/simd-build-vector.ll @@ -283,12 +283,9 @@ ; CHECK-LABEL: half_shuffle_i32x4: ; CHECK: .functype half_shuffle_i32x4 (v128) -> (v128) ; CHECK-NEXT: # %bb.0: -; CHECK-NEXT: i8x16.shuffle $push0=, $0, $0, 0, 1, 2, 3, 8, 9, 10, 11, 0, 1, 2, 3, 0, 1, 2, 3 -; CHECK-NEXT: i32.const $push1=, 0 -; CHECK-NEXT: i32x4.replace_lane $push2=, $pop0, 0, $pop1 -; CHECK-NEXT: i32.const $push3=, 3 -; CHECK-NEXT: i32x4.replace_lane $push4=, $pop2, 3, $pop3 -; CHECK-NEXT: return $pop4 +; CHECK-NEXT: v128.const $push0=, 0, 0, 0, 3 +; CHECK-NEXT: i8x16.shuffle $push1=, $pop0, $0, 0, 1, 2, 3, 24, 25, 26, 27, 16, 17, 18, 19, 12, 13, 14, 15 +; CHECK-NEXT: return $pop1 %s0 = extractelement <4 x i32> %src, i32 0 %s2 = extractelement <4 x i32> %src, i32 2 %v0 = insertelement <4 x i32> undef, i32 0, i32 0 Index: llvm/test/CodeGen/WebAssembly/simd-comparisons.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/simd-comparisons.ll +++ llvm/test/CodeGen/WebAssembly/simd-comparisons.ll @@ -1100,10 +1100,8 @@ ; CHECK-LABEL: compare_ord_nnan_v4f32: ; NO-SIMD128-NOT: f32x4 ; SIMD128-NEXT: .functype compare_ord_nnan_v4f32 (v128, v128) -> (v128){{$}} -; SIMD128-NEXT: f32x4.eq $push[[T0:[0-9]+]]=, $0, $0{{$}} -; SIMD128-NEXT: f32x4.eq $push[[T1:[0-9]+]]=, $1, $1{{$}} -; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}} -; SIMD128-NEXT: return $pop[[R]]{{$}} +; SIMD128-NEXT: v128.const $push0=, 1, 1, 1, 1 +; SIMD128-NEXT: return $pop0 define <4 x i1> @compare_ord_nnan_v4f32 (<4 x float> %x, <4 x float> %y) { %res = fcmp nnan ord <4 x float> %x, %y ret <4 x i1> %res @@ -1125,10 +1123,8 @@ ; CHECK-LABEL: compare_sext_ord_nnan_v4f32: ; NO-SIMD128-NOT: f32x4 ; SIMD128-NEXT: .functype compare_sext_ord_nnan_v4f32 (v128, v128) -> (v128){{$}} -; SIMD128-NEXT: f32x4.eq $push[[T0:[0-9]+]]=, $0, $0{{$}} -; SIMD128-NEXT: f32x4.eq $push[[T1:[0-9]+]]=, $1, $1{{$}} -; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}} -; SIMD128-NEXT: return $pop[[R]]{{$}} +; SIMD128-NEXT: v128.const $push0=, -1, -1, -1, -1 +; SIMD128-NEXT: return $pop0 define <4 x i32> @compare_sext_ord_nnan_v4f32 (<4 x float> %x, <4 x float> %y) { %cmp = fcmp nnan ord <4 x float> %x, %y %res = sext <4 x i1> %cmp to <4 x i32> @@ -1416,10 +1412,8 @@ ; CHECK-LABEL: compare_uno_nnan_v4f32: ; NO-SIMD128-NOT: f32x4 ; SIMD128-NEXT: .functype compare_uno_nnan_v4f32 (v128, v128) -> (v128){{$}} -; SIMD128-NEXT: f32x4.ne $push[[T0:[0-9]+]]=, $0, $0{{$}} -; SIMD128-NEXT: f32x4.ne $push[[T1:[0-9]+]]=, $1, $1{{$}} -; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}} -; SIMD128-NEXT: return $pop[[R]]{{$}} +; SIMD128-NEXT: v128.const $push0=, 0, 0, 0, 0 +; SIMD128-NEXT: return $pop0 define <4 x i1> @compare_uno_nnan_v4f32 (<4 x float> %x, <4 x float> %y) { %res = fcmp nnan uno <4 x float> %x, %y ret <4 x i1> %res @@ -1441,10 +1435,8 @@ ; CHECK-LABEL: compare_sext_uno_nnan_v4f32: ; NO-SIMD128-NOT: f32x4 ; SIMD128-NEXT: .functype compare_sext_uno_nnan_v4f32 (v128, v128) -> (v128){{$}} -; SIMD128-NEXT: f32x4.ne $push[[T0:[0-9]+]]=, $0, $0{{$}} -; SIMD128-NEXT: f32x4.ne $push[[T1:[0-9]+]]=, $1, $1{{$}} -; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}} -; SIMD128-NEXT: return $pop[[R]]{{$}} +; SIMD128-NEXT: v128.const $push0=, 0, 0, 0, 0 +; SIMD128-NEXT: return $pop0 define <4 x i32> @compare_sext_uno_nnan_v4f32 (<4 x float> %x, <4 x float> %y) { %cmp = fcmp nnan uno <4 x float> %x, %y %res = sext <4 x i1> %cmp to <4 x i32> @@ -1722,10 +1714,8 @@ ; CHECK-LABEL: compare_ord_nnan_v2f64: ; NO-SIMD128-NOT: f64x2 ; SIMD128-NEXT: .functype compare_ord_nnan_v2f64 (v128, v128) -> (v128){{$}} -; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $0{{$}} -; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $1, $1{{$}} -; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}} -; SIMD128-NEXT: return $pop[[R]]{{$}} +; SIMD128-NEXT: v128.const $push0=, 1, 1 +; SIMD128-NEXT: return $pop0 define <2 x i1> @compare_ord_nnan_v2f64 (<2 x double> %x, <2 x double> %y) { %res = fcmp nnan ord <2 x double> %x, %y ret <2 x i1> %res @@ -1747,10 +1737,8 @@ ; CHECK-LABEL: compare_sext_ord_nnan_v2f64: ; NO-SIMD128-NOT: f64x2 ; SIMD128-NEXT: .functype compare_sext_ord_nnan_v2f64 (v128, v128) -> (v128){{$}} -; SIMD128-NEXT: f64x2.eq $push[[T0:[0-9]+]]=, $0, $0{{$}} -; SIMD128-NEXT: f64x2.eq $push[[T1:[0-9]+]]=, $1, $1{{$}} -; SIMD128-NEXT: v128.and $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}} -; SIMD128-NEXT: return $pop[[R]]{{$}} +; SIMD128-NEXT: v128.const $push0=, -1, -1 +; SIMD128-NEXT: return $pop0 define <2 x i64> @compare_sext_ord_nnan_v2f64 (<2 x double> %x, <2 x double> %y) { %cmp = fcmp nnan ord <2 x double> %x, %y %res = sext <2 x i1> %cmp to <2 x i64> @@ -2038,10 +2026,8 @@ ; CHECK-LABEL: compare_uno_nnan_v2f64: ; NO-SIMD128-NOT: f64x2 ; SIMD128-NEXT: .functype compare_uno_nnan_v2f64 (v128, v128) -> (v128){{$}} -; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $0{{$}} -; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $1, $1{{$}} -; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}} -; SIMD128-NEXT: return $pop[[R]]{{$}} +; SIMD128-NEXT: v128.const $push0=, 0, 0 +; SIMD128-NEXT: return $pop0 define <2 x i1> @compare_uno_nnan_v2f64 (<2 x double> %x, <2 x double> %y) { %res = fcmp nnan uno <2 x double> %x, %y ret <2 x i1> %res @@ -2063,10 +2049,8 @@ ; CHECK-LABEL: compare_sext_uno_nnan_v2f64: ; NO-SIMD128-NOT: f64x2 ; SIMD128-NEXT: .functype compare_sext_uno_nnan_v2f64 (v128, v128) -> (v128){{$}} -; SIMD128-NEXT: f64x2.ne $push[[T0:[0-9]+]]=, $0, $0{{$}} -; SIMD128-NEXT: f64x2.ne $push[[T1:[0-9]+]]=, $1, $1{{$}} -; SIMD128-NEXT: v128.or $push[[R:[0-9]+]]=, $pop[[T0]], $pop[[T1]]{{$}} -; SIMD128-NEXT: return $pop[[R]]{{$}} +; SIMD128-NEXT: v128.const $push0=, 0, 0 +; SIMD128-NEXT: return $pop0 define <2 x i64> @compare_sext_uno_nnan_v2f64 (<2 x double> %x, <2 x double> %y) { %cmp = fcmp nnan uno <2 x double> %x, %y %res = sext <2 x i1> %cmp to <2 x i64> Index: llvm/test/CodeGen/WebAssembly/simd-illegal-signext.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/simd-illegal-signext.ll +++ llvm/test/CodeGen/WebAssembly/simd-illegal-signext.ll @@ -10,22 +10,22 @@ target triple = "wasm32-unknown-emscripten" -define void @foo() { +define void @foo(ptr %arg) { ; CHECK-LABEL: foo: -; CHECK: .functype foo () -> () -; CHECK-NEXT: .local i32 +; CHECK: .functype foo (i32) -> () ; CHECK-NEXT: # %bb.0: # %entry -; CHECK-NEXT: i32.const 0 +; CHECK-NEXT: local.get 0 +; CHECK-NEXT: i32.load 0 +; CHECK-NEXT: local.tee 0 ; CHECK-NEXT: local.get 0 ; CHECK-NEXT: i32.load8_s 0 ; CHECK-NEXT: i32.store16 0 ; CHECK-NEXT: # fallthrough-return entry: - %0 = load ptr, ptr undef, align 4 - %1 = load i32, ptr %0, align 4 - %2 = load i32, ptr undef, align 4 - %conv67 = trunc i32 %2 to i8 + %ptr.1 = load ptr, ptr %arg, align 4 + %data = load i32, ptr %ptr.1, align 4 + %conv67 = trunc i32 %data to i8 %conv68 = sext i8 %conv67 to i16 - store i16 %conv68, ptr null, align 2 + store i16 %conv68, ptr %ptr.1, align 2 ret void } Index: llvm/test/CodeGen/WebAssembly/simd-offset.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/simd-offset.ll +++ llvm/test/CodeGen/WebAssembly/simd-offset.ll @@ -835,7 +835,7 @@ ; CHECK: .functype load_ext_v8i16_from_numeric_address () -> (v128) ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const 0 -; CHECK-NEXT: v128.load64_zero 32 +; CHECK-NEXT: v128.load 32 ; CHECK-NEXT: # fallthrough-return %s = inttoptr i32 32 to ptr %v = load <8 x i8>, ptr %s @@ -1847,7 +1847,7 @@ ; CHECK-NEXT: .local v128 ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const 0 -; CHECK-NEXT: v128.load32_zero 32 +; CHECK-NEXT: v128.load 32 ; CHECK-NEXT: local.get 0 ; CHECK-NEXT: i8x16.shuffle 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0 ; CHECK-NEXT: i32.const 24 @@ -1867,7 +1867,7 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: v128.const 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ; CHECK-NEXT: i32.const 0 -; CHECK-NEXT: v128.load32_zero 32 +; CHECK-NEXT: v128.load 32 ; CHECK-NEXT: i8x16.shuffle 16, 1, 2, 3, 17, 5, 6, 7, 18, 9, 10, 11, 19, 13, 14, 15 ; CHECK-NEXT: # fallthrough-return %s = inttoptr i32 32 to ptr @@ -1881,7 +1881,7 @@ ; CHECK: .functype load_ext_v4i32_from_numeric_address () -> (v128) ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const 0 -; CHECK-NEXT: v128.load64_zero 32 +; CHECK-NEXT: v128.load 32 ; CHECK-NEXT: # fallthrough-return %s = inttoptr i32 32 to ptr %v = load <4 x i16>, ptr %s @@ -2697,7 +2697,7 @@ ; CHECK: .functype load_ext_v2i64_from_numeric_address () -> (v128) ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const 0 -; CHECK-NEXT: v128.load64_zero 32 +; CHECK-NEXT: v128.load 32 ; CHECK-NEXT: # fallthrough-return %s = inttoptr i32 32 to ptr %v = load <2 x i32>, ptr %s Index: llvm/test/CodeGen/WebAssembly/simd.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/simd.ll +++ llvm/test/CodeGen/WebAssembly/simd.ll @@ -1,6 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py -; RUN: llc < %s -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mattr=+simd128,+sign-ext | FileCheck %s --check-prefix=SIMD128 -; RUN: llc < %s -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers | FileCheck %s --check-prefix=NO-SIMD128 +; RUN: llc < %s -O1 -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mattr=+simd128,+sign-ext | FileCheck %s --check-prefix=SIMD128 +; RUN: llc < %s -O1 -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers | FileCheck %s --check-prefix=NO-SIMD128 ; Test that basic SIMD128 vector manipulation operations assemble as expected. Index: llvm/test/CodeGen/WebAssembly/stack-protector.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/stack-protector.ll +++ llvm/test/CodeGen/WebAssembly/stack-protector.ll @@ -9,26 +9,23 @@ ; WASM32-NEXT: .local i32 ; WASM32-NEXT: # %bb.0: # %entry ; WASM32-NEXT: global.get __stack_pointer -; WASM32-NEXT: i32.const 32 +; WASM32-NEXT: i32.const 16 ; WASM32-NEXT: i32.sub ; WASM32-NEXT: local.tee 1 ; WASM32-NEXT: global.set __stack_pointer ; WASM32-NEXT: local.get 1 -; WASM32-NEXT: local.get 0 -; WASM32-NEXT: i32.store 16 -; WASM32-NEXT: local.get 1 ; WASM32-NEXT: i32.const 0 ; WASM32-NEXT: i32.load __stack_chk_guard -; WASM32-NEXT: i32.store 28 +; WASM32-NEXT: i32.store 12 ; WASM32-NEXT: local.get 1 -; WASM32-NEXT: i32.const 20 +; WASM32-NEXT: i32.const 4 ; WASM32-NEXT: i32.add ; WASM32-NEXT: local.get 0 ; WASM32-NEXT: call strcpy ; WASM32-NEXT: drop ; WASM32-NEXT: local.get 1 ; WASM32-NEXT: local.get 1 -; WASM32-NEXT: i32.const 20 +; WASM32-NEXT: i32.const 4 ; WASM32-NEXT: i32.add ; WASM32-NEXT: i32.store 0 ; WASM32-NEXT: i32.const LC @@ -39,7 +36,7 @@ ; WASM32-NEXT: i32.const 0 ; WASM32-NEXT: i32.load __stack_chk_guard ; WASM32-NEXT: local.get 1 -; WASM32-NEXT: i32.load 28 +; WASM32-NEXT: i32.load 12 ; WASM32-NEXT: i32.eq ; WASM32-NEXT: br_if 0 # 0: down to label0 ; WASM32-NEXT: # %bb.1: # %return @@ -48,7 +45,7 @@ ; WASM32-NEXT: .LBB0_2: # %return ; WASM32-NEXT: end_block # label0: ; WASM32-NEXT: local.get 1 -; WASM32-NEXT: i32.const 32 +; WASM32-NEXT: i32.const 16 ; WASM32-NEXT: i32.add ; WASM32-NEXT: global.set __stack_pointer ; WASM32-NEXT: # fallthrough-return @@ -72,26 +69,23 @@ ; WASM32-NEXT: .local i32 ; WASM32-NEXT: # %bb.0: # %entry ; WASM32-NEXT: global.get __stack_pointer -; WASM32-NEXT: i32.const 32 +; WASM32-NEXT: i32.const 16 ; WASM32-NEXT: i32.sub ; WASM32-NEXT: local.tee 1 ; WASM32-NEXT: global.set __stack_pointer ; WASM32-NEXT: local.get 1 -; WASM32-NEXT: local.get 0 -; WASM32-NEXT: i32.store 16 -; WASM32-NEXT: local.get 1 ; WASM32-NEXT: i32.const 0 ; WASM32-NEXT: i32.load __stack_chk_guard -; WASM32-NEXT: i32.store 28 +; WASM32-NEXT: i32.store 12 ; WASM32-NEXT: local.get 1 -; WASM32-NEXT: i32.const 20 +; WASM32-NEXT: i32.const 4 ; WASM32-NEXT: i32.add ; WASM32-NEXT: local.get 0 ; WASM32-NEXT: call strcpy ; WASM32-NEXT: drop ; WASM32-NEXT: local.get 1 ; WASM32-NEXT: local.get 1 -; WASM32-NEXT: i32.const 20 +; WASM32-NEXT: i32.const 4 ; WASM32-NEXT: i32.add ; WASM32-NEXT: i32.store 0 ; WASM32-NEXT: i32.const LC @@ -102,7 +96,7 @@ ; WASM32-NEXT: i32.const 0 ; WASM32-NEXT: i32.load __stack_chk_guard ; WASM32-NEXT: local.get 1 -; WASM32-NEXT: i32.load 28 +; WASM32-NEXT: i32.load 12 ; WASM32-NEXT: i32.eq ; WASM32-NEXT: br_if 0 # 0: down to label1 ; WASM32-NEXT: # %bb.1: # %return @@ -111,7 +105,7 @@ ; WASM32-NEXT: .LBB1_2: # %return ; WASM32-NEXT: end_block # label1: ; WASM32-NEXT: local.get 1 -; WASM32-NEXT: i32.const 32 +; WASM32-NEXT: i32.const 16 ; WASM32-NEXT: i32.add ; WASM32-NEXT: global.set __stack_pointer ; WASM32-NEXT: i32.const 0 Index: llvm/test/CodeGen/WebAssembly/umulo-i64.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/umulo-i64.ll +++ llvm/test/CodeGen/WebAssembly/umulo-i64.ll @@ -8,16 +8,6 @@ ; CHECK-LABEL: _ZN4core3num21_$LT$impl$u20$u64$GT$15overflowing_mul17h07be88b4cbac028fE: ; CHECK: .functype _ZN4core3num21_$LT$impl$u20$u64$GT$15overflowing_mul17h07be88b4cbac028fE (i64, i64) -> () ; CHECK-NEXT: # %bb.0: # %start -; CHECK-NEXT: global.get $push2=, __stack_pointer -; CHECK-NEXT: i32.const $push3=, 16 -; CHECK-NEXT: i32.sub $push6=, $pop2, $pop3 -; CHECK-NEXT: local.tee $push5=, $2=, $pop6 -; CHECK-NEXT: global.set __stack_pointer, $pop5 -; CHECK-NEXT: i64.const $push0=, 0 -; CHECK-NEXT: i64.const $push4=, 0 -; CHECK-NEXT: call __multi3, $2, $0, $pop0, $1, $pop4 -; CHECK-NEXT: i64.load $push1=, 0($2) -; CHECK-NEXT: i64.store 0($2), $pop1 ; CHECK-NEXT: unreachable start: %2 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %0, i64 %1) Index: llvm/test/CodeGen/WebAssembly/userstack.ll =================================================================== --- llvm/test/CodeGen/WebAssembly/userstack.ll +++ llvm/test/CodeGen/WebAssembly/userstack.ll @@ -1,6 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py -; RUN: llc < %s --mtriple=wasm32-unknown-unknown -disable-wasm-fallthrough-return-opt -wasm-keep-registers | FileCheck -DPTR=32 %s --check-prefix=CHECK-32 -; RUN: llc < %s --mtriple=wasm64-unknown-unknown -disable-wasm-fallthrough-return-opt -wasm-keep-registers | FileCheck -DPTR=64 %s --check-prefix=CHECK-64 +; RUN: llc < %s -O1 --mtriple=wasm32-unknown-unknown -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-keep-registers | FileCheck -DPTR=32 %s +; RUN: llc < %s -O1 --mtriple=wasm64-unknown-unknown -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-keep-registers | FileCheck -DPTR=64 %s declare void @ext_func(ptr %ptr) declare void @ext_func_i32(ptr %ptr) @@ -801,3 +801,5 @@ } ; TODO: test over-aligned alloca +;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: +; CHECK: {{.*}} Index: llvm/test/DebugInfo/WebAssembly/stackified-debug.ll =================================================================== --- llvm/test/DebugInfo/WebAssembly/stackified-debug.ll +++ llvm/test/DebugInfo/WebAssembly/stackified-debug.ll @@ -1,5 +1,5 @@ ; RUN: llc -verify-machineinstrs < %s | FileCheck %s -; RUN: llc -filetype=obj %s -o - | llvm-dwarfdump - | FileCheck %s --check-prefix DWARF +; RUN: llc -O1 -filetype=obj %s -o - | llvm-dwarfdump - | FileCheck %s --check-prefix DWARF ; Input C code: Index: llvm/test/MC/WebAssembly/func-address.ll =================================================================== --- llvm/test/MC/WebAssembly/func-address.ll +++ llvm/test/MC/WebAssembly/func-address.ll @@ -1,4 +1,4 @@ -; RUN: llc -O2 -filetype=obj %s -o - | llvm-readobj -S -r --expand-relocs - | FileCheck %s +; RUN: llc -O1 -filetype=obj %s -o - | llvm-readobj -S -r --expand-relocs - | FileCheck %s target triple = "wasm32-unknown-unknown" Index: llvm/test/MC/WebAssembly/stack-ptr-mclower.ll =================================================================== --- llvm/test/MC/WebAssembly/stack-ptr-mclower.ll +++ llvm/test/MC/WebAssembly/stack-ptr-mclower.ll @@ -1,5 +1,5 @@ -; RUN: llc --mtriple=wasm32-unknown-unknown -asm-verbose=false %s -o - | FileCheck --check-prefixes CHECK -DPTR=i32 %s -; RUN: llc --mtriple=wasm64-unknown-unknown -asm-verbose=false %s -o - | FileCheck --check-prefixes CHECK -DPTR=i64 %s +; RUN: llc -O1 --mtriple=wasm32-unknown-unknown -asm-verbose=false %s -o - | FileCheck --check-prefixes CHECK -DPTR=i32 %s +; RUN: llc -O1 --mtriple=wasm64-unknown-unknown -asm-verbose=false %s -o - | FileCheck --check-prefixes CHECK -DPTR=i64 %s ; empty function that does not use stack, to check WebAssemblyMCLowerPrePass ; works correctly. Index: llvm/test/MC/WebAssembly/stack-ptr.ll =================================================================== --- llvm/test/MC/WebAssembly/stack-ptr.ll +++ llvm/test/MC/WebAssembly/stack-ptr.ll @@ -1,5 +1,5 @@ -; RUN: llc --mtriple=wasm32-unknown-unknown -filetype=obj %s -o - | obj2yaml | FileCheck --check-prefixes CHECK,CHK32 %s -; RUN: llc --mtriple=wasm64-unknown-unknown -filetype=obj %s -o - | obj2yaml | FileCheck --check-prefixes CHECK,CHK64 %s +; RUN: llc -O1 --mtriple=wasm32-unknown-unknown -filetype=obj %s -o - | obj2yaml | FileCheck --check-prefixes CHECK,CHK32 %s +; RUN: llc -O1 --mtriple=wasm64-unknown-unknown -filetype=obj %s -o - | obj2yaml | FileCheck --check-prefixes CHECK,CHK64 %s ; Function that uses explict stack, and should generate a reference to ; __stack_pointer, along with the corresponding reloction entry. Index: llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/wasm_generated_funcs.ll.generated.expected =================================================================== --- llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/wasm_generated_funcs.ll.generated.expected +++ llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/wasm_generated_funcs.ll.generated.expected @@ -69,69 +69,24 @@ ; CHECK-NEXT: .local i32 ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: global.get __stack_pointer -; CHECK-NEXT: i32.const 32 +; CHECK-NEXT: i32.const 16 ; CHECK-NEXT: i32.sub ; CHECK-NEXT: local.tee 0 ; CHECK-NEXT: global.set __stack_pointer ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 0 -; CHECK-NEXT: i32.store 24 -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 0 -; CHECK-NEXT: i32.store 28 -; CHECK-NEXT: block +; CHECK-NEXT: i32.const 1 +; CHECK-NEXT: i32.store 12 ; CHECK-NEXT: block -; CHECK-NEXT: i32.const 0 -; CHECK-NEXT: br_if 0 # 0: down to label1 +; CHECK-NEXT: i32.const 1 +; CHECK-NEXT: br_if 0 # 0: down to label0 ; CHECK-NEXT: # %bb.1: ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 2 -; CHECK-NEXT: i32.store 20 -; CHECK-NEXT: local.get 0 ; CHECK-NEXT: i32.const 1 -; CHECK-NEXT: i32.store 24 -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 3 -; CHECK-NEXT: i32.store 16 -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 4 ; CHECK-NEXT: i32.store 12 -; CHECK-NEXT: br 1 # 1: down to label0 ; CHECK-NEXT: .LBB0_2: -; CHECK-NEXT: end_block # label1: -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 1 -; CHECK-NEXT: i32.store 16 -; CHECK-NEXT: .LBB0_3: ; CHECK-NEXT: end_block # label0: -; CHECK-NEXT: block -; CHECK-NEXT: block -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.load 24 -; CHECK-NEXT: br_if 0 # 0: down to label3 -; CHECK-NEXT: # %bb.4: -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 2 -; CHECK-NEXT: i32.store 20 -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 1 -; CHECK-NEXT: i32.store 24 -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 3 -; CHECK-NEXT: i32.store 16 -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 4 -; CHECK-NEXT: i32.store 12 -; CHECK-NEXT: br 1 # 1: down to label2 -; CHECK-NEXT: .LBB0_5: -; CHECK-NEXT: end_block # label3: -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 1 -; CHECK-NEXT: i32.store 16 -; CHECK-NEXT: .LBB0_6: -; CHECK-NEXT: end_block # label2: ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 32 +; CHECK-NEXT: i32.const 16 ; CHECK-NEXT: i32.add ; CHECK-NEXT: global.set __stack_pointer ; CHECK-NEXT: i32.const 0 @@ -139,49 +94,12 @@ ; ; CHECK-LABEL: __original_main: ; CHECK: .functype __original_main () -> (i32) -; CHECK-NEXT: .local i32 ; CHECK-NEXT: # %bb.0: -; CHECK-NEXT: global.get __stack_pointer -; CHECK-NEXT: i32.const 32 -; CHECK-NEXT: i32.sub -; CHECK-NEXT: local.tee 0 -; CHECK-NEXT: global.set __stack_pointer ; CHECK-NEXT: i32.const 0 ; CHECK-NEXT: i32.const 1 ; CHECK-NEXT: i32.store x -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 0 -; CHECK-NEXT: i32.store 28 -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 1 -; CHECK-NEXT: i32.store 24 -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 2 -; CHECK-NEXT: i32.store 20 -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 3 -; CHECK-NEXT: i32.store 16 -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 4 -; CHECK-NEXT: i32.store 12 ; CHECK-NEXT: #APP ; CHECK-NEXT: #NO_APP -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 2 -; CHECK-NEXT: i32.store 20 -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 1 -; CHECK-NEXT: i32.store 24 -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 3 -; CHECK-NEXT: i32.store 16 -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 4 -; CHECK-NEXT: i32.store 12 -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 32 -; CHECK-NEXT: i32.add -; CHECK-NEXT: global.set __stack_pointer ; CHECK-NEXT: i32.const 0 ; CHECK-NEXT: # fallthrough-return ; Index: llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/wasm_generated_funcs.ll.nogenerated.expected =================================================================== --- llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/wasm_generated_funcs.ll.nogenerated.expected +++ llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/wasm_generated_funcs.ll.nogenerated.expected @@ -10,69 +10,24 @@ ; CHECK-NEXT: .local i32 ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: global.get __stack_pointer -; CHECK-NEXT: i32.const 32 +; CHECK-NEXT: i32.const 16 ; CHECK-NEXT: i32.sub ; CHECK-NEXT: local.tee 0 ; CHECK-NEXT: global.set __stack_pointer ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 0 -; CHECK-NEXT: i32.store 24 -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 0 -; CHECK-NEXT: i32.store 28 -; CHECK-NEXT: block +; CHECK-NEXT: i32.const 1 +; CHECK-NEXT: i32.store 12 ; CHECK-NEXT: block -; CHECK-NEXT: i32.const 0 -; CHECK-NEXT: br_if 0 # 0: down to label1 +; CHECK-NEXT: i32.const 1 +; CHECK-NEXT: br_if 0 # 0: down to label0 ; CHECK-NEXT: # %bb.1: ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 2 -; CHECK-NEXT: i32.store 20 -; CHECK-NEXT: local.get 0 ; CHECK-NEXT: i32.const 1 -; CHECK-NEXT: i32.store 24 -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 3 -; CHECK-NEXT: i32.store 16 -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 4 ; CHECK-NEXT: i32.store 12 -; CHECK-NEXT: br 1 # 1: down to label0 ; CHECK-NEXT: .LBB0_2: -; CHECK-NEXT: end_block # label1: -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 1 -; CHECK-NEXT: i32.store 16 -; CHECK-NEXT: .LBB0_3: ; CHECK-NEXT: end_block # label0: -; CHECK-NEXT: block -; CHECK-NEXT: block -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.load 24 -; CHECK-NEXT: br_if 0 # 0: down to label3 -; CHECK-NEXT: # %bb.4: -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 2 -; CHECK-NEXT: i32.store 20 -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 1 -; CHECK-NEXT: i32.store 24 -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 3 -; CHECK-NEXT: i32.store 16 -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 4 -; CHECK-NEXT: i32.store 12 -; CHECK-NEXT: br 1 # 1: down to label2 -; CHECK-NEXT: .LBB0_5: -; CHECK-NEXT: end_block # label3: -; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 1 -; CHECK-NEXT: i32.store 16 -; CHECK-NEXT: .LBB0_6: -; CHECK-NEXT: end_block # label2: ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: i32.const 32 +; CHECK-NEXT: i32.const 16 ; CHECK-NEXT: i32.add ; CHECK-NEXT: global.set __stack_pointer ; CHECK-NEXT: i32.const 0