Index: lib/Target/WebAssembly/WebAssemblyInstrSIMD.td =================================================================== --- lib/Target/WebAssembly/WebAssemblyInstrSIMD.td +++ lib/Target/WebAssembly/WebAssemblyInstrSIMD.td @@ -19,13 +19,14 @@ def LaneIdx#SIZE : ImmLeaf; multiclass ConstVec { + let isMoveImm = 1, isAsCheapAsAMove = 1, isReMaterializable = 1 in defm CONST_V128_#vec_t : SIMD_I<(outs V128:$dst), ops, (outs), ops, [(set V128:$dst, (vec_t pat))], "v128.const\t$dst, "#args, "v128.const\t"#args, 0>; } multiclass SIMDLoad { - let mayLoad = 1 in + let mayLoad = 1, isAsCheapAsAMove = 1 in defm LOAD_#vec_t : SIMD_I<(outs V128:$dst), (ins P2Align:$align, offset32_op:$off, I32:$addr), (outs), (ins P2Align:$align, offset32_op:$off), [], @@ -33,7 +34,7 @@ "v128.load\t$off$align", 1>; } multiclass SIMDStore { - let mayStore = 1 in + let mayStore = 1, isAsCheapAsAMove = 1 in defm STORE_#vec_t : SIMD_I<(outs), (ins P2Align:$align, offset32_op:$off, I32:$addr, V128:$vec), (outs), (ins P2Align:$align, offset32_op:$off), [],