diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp --- a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp @@ -724,7 +724,7 @@ Info.memVT = Intrinsic == Intrinsic::wasm_load32_zero ? MVT::i32 : MVT::i64; Info.ptrVal = I.getArgOperand(0); Info.offset = 0; - Info.align = Info.memVT == MVT::i32 ? Align(4) : Align(8); + Info.align = Align(1); Info.flags = MachineMemOperand::MOLoad; return true; case Intrinsic::wasm_load8_lane: @@ -736,27 +736,22 @@ case Intrinsic::wasm_store32_lane: case Intrinsic::wasm_store64_lane: { MVT MemVT; - Align MemAlign; switch (Intrinsic) { case Intrinsic::wasm_load8_lane: case Intrinsic::wasm_store8_lane: MemVT = MVT::i8; - MemAlign = Align(1); break; case Intrinsic::wasm_load16_lane: case Intrinsic::wasm_store16_lane: MemVT = MVT::i16; - MemAlign = Align(2); break; case Intrinsic::wasm_load32_lane: case Intrinsic::wasm_store32_lane: MemVT = MVT::i32; - MemAlign = Align(4); break; case Intrinsic::wasm_load64_lane: case Intrinsic::wasm_store64_lane: MemVT = MVT::i64; - MemAlign = Align(8); break; default: llvm_unreachable("unexpected intrinsic"); @@ -774,7 +769,7 @@ Info.ptrVal = I.getArgOperand(0); Info.memVT = MemVT; Info.offset = 0; - Info.align = MemAlign; + Info.align = Align(1); return true; } default: diff --git a/llvm/test/CodeGen/WebAssembly/simd-load-lane-offset.ll b/llvm/test/CodeGen/WebAssembly/simd-load-lane-offset.ll --- a/llvm/test/CodeGen/WebAssembly/simd-load-lane-offset.ll +++ b/llvm/test/CodeGen/WebAssembly/simd-load-lane-offset.ll @@ -266,7 +266,7 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: local.get 0 ; CHECK-NEXT: local.get 1 -; CHECK-NEXT: v128.load16_lane 0, 0 +; CHECK-NEXT: v128.load16_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %t = tail call <8 x i16> @llvm.wasm.load16.lane(i16* %p, <8 x i16> %v, i32 0) ret <8 x i16> %t @@ -280,7 +280,7 @@ ; CHECK-NEXT: i32.const 24 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 1 -; CHECK-NEXT: v128.load16_lane 0, 0 +; CHECK-NEXT: v128.load16_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %q = ptrtoint i16* %p to i32 %r = add nuw i32 %q, 24 @@ -297,7 +297,7 @@ ; CHECK-NEXT: i32.const 12 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 1 -; CHECK-NEXT: v128.load16_lane 0, 0 +; CHECK-NEXT: v128.load16_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %s = getelementptr inbounds i16, i16* %p, i32 6 %t = tail call <8 x i16> @llvm.wasm.load16.lane(i16* %s, <8 x i16> %v, i32 0) @@ -312,7 +312,7 @@ ; CHECK-NEXT: i32.const -12 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 1 -; CHECK-NEXT: v128.load16_lane 0, 0 +; CHECK-NEXT: v128.load16_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %s = getelementptr inbounds i16, i16* %p, i32 -6 %t = tail call <8 x i16> @llvm.wasm.load16.lane(i16* %s, <8 x i16> %v, i32 0) @@ -327,7 +327,7 @@ ; CHECK-NEXT: i32.const 24 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 1 -; CHECK-NEXT: v128.load16_lane 0, 0 +; CHECK-NEXT: v128.load16_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %q = ptrtoint i16* %p to i32 %r = add nsw i32 %q, 24 @@ -344,7 +344,7 @@ ; CHECK-NEXT: i32.const 12 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 1 -; CHECK-NEXT: v128.load16_lane 0, 0 +; CHECK-NEXT: v128.load16_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %s = getelementptr i16, i16* %p, i32 6 %t = tail call <8 x i16> @llvm.wasm.load16.lane(i16* %s, <8 x i16> %v, i32 0) @@ -357,7 +357,7 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const 42 ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.load16_lane 0, 0 +; CHECK-NEXT: v128.load16_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %s = inttoptr i32 42 to i16* %t = tail call <8 x i16> @llvm.wasm.load16.lane(i16* %s, <8 x i16> %v, i32 0) @@ -371,7 +371,7 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const gv_i16 ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.load16_lane 0, 0 +; CHECK-NEXT: v128.load16_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %t = tail call <8 x i16> @llvm.wasm.load16.lane(i16* @gv_i16, <8 x i16> %v, i32 0) ret <8 x i16> %t @@ -383,7 +383,7 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: local.get 1 ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.store16_lane 0, 0 +; CHECK-NEXT: v128.store16_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return tail call void @llvm.wasm.store16.lane(i16* %p, <8 x i16> %v, i32 0) ret void @@ -397,7 +397,7 @@ ; CHECK-NEXT: i32.const 24 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.store16_lane 0, 0 +; CHECK-NEXT: v128.store16_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %q = ptrtoint i16* %p to i32 %r = add nuw i32 %q, 24 @@ -414,7 +414,7 @@ ; CHECK-NEXT: i32.const 12 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.store16_lane 0, 0 +; CHECK-NEXT: v128.store16_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %s = getelementptr inbounds i16, i16* %p, i32 6 tail call void @llvm.wasm.store16.lane(i16* %s, <8 x i16> %v, i32 0) @@ -429,7 +429,7 @@ ; CHECK-NEXT: i32.const -12 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.store16_lane 0, 0 +; CHECK-NEXT: v128.store16_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %s = getelementptr inbounds i16, i16* %p, i32 -6 tail call void @llvm.wasm.store16.lane(i16* %s, <8 x i16> %v, i32 0) @@ -444,7 +444,7 @@ ; CHECK-NEXT: i32.const 24 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.store16_lane 0, 0 +; CHECK-NEXT: v128.store16_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %q = ptrtoint i16* %p to i32 %r = add nsw i32 %q, 24 @@ -461,7 +461,7 @@ ; CHECK-NEXT: i32.const 12 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.store16_lane 0, 0 +; CHECK-NEXT: v128.store16_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %s = getelementptr i16, i16* %p, i32 6 tail call void @llvm.wasm.store16.lane(i16* %s, <8 x i16> %v, i32 0) @@ -474,7 +474,7 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const 42 ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.store16_lane 0, 0 +; CHECK-NEXT: v128.store16_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %s = inttoptr i32 42 to i16* tail call void @llvm.wasm.store16.lane(i16* %s, <8 x i16> %v, i32 0) @@ -487,7 +487,7 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const gv_i16 ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.store16_lane 0, 0 +; CHECK-NEXT: v128.store16_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return tail call void @llvm.wasm.store16.lane(i16* @gv_i16, <8 x i16> %v, i32 0) ret void @@ -503,7 +503,7 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: local.get 0 ; CHECK-NEXT: local.get 1 -; CHECK-NEXT: v128.load32_lane 0, 0 +; CHECK-NEXT: v128.load32_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %t = tail call <4 x i32> @llvm.wasm.load32.lane(i32* %p, <4 x i32> %v, i32 0) ret <4 x i32> %t @@ -517,7 +517,7 @@ ; CHECK-NEXT: i32.const 24 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 1 -; CHECK-NEXT: v128.load32_lane 0, 0 +; CHECK-NEXT: v128.load32_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %q = ptrtoint i32* %p to i32 %r = add nuw i32 %q, 24 @@ -534,7 +534,7 @@ ; CHECK-NEXT: i32.const 24 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 1 -; CHECK-NEXT: v128.load32_lane 0, 0 +; CHECK-NEXT: v128.load32_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %s = getelementptr inbounds i32, i32* %p, i32 6 %t = tail call <4 x i32> @llvm.wasm.load32.lane(i32* %s, <4 x i32> %v, i32 0) @@ -549,7 +549,7 @@ ; CHECK-NEXT: i32.const -24 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 1 -; CHECK-NEXT: v128.load32_lane 0, 0 +; CHECK-NEXT: v128.load32_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %s = getelementptr inbounds i32, i32* %p, i32 -6 %t = tail call <4 x i32> @llvm.wasm.load32.lane(i32* %s, <4 x i32> %v, i32 0) @@ -564,7 +564,7 @@ ; CHECK-NEXT: i32.const 24 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 1 -; CHECK-NEXT: v128.load32_lane 0, 0 +; CHECK-NEXT: v128.load32_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %q = ptrtoint i32* %p to i32 %r = add nsw i32 %q, 24 @@ -581,7 +581,7 @@ ; CHECK-NEXT: i32.const 24 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 1 -; CHECK-NEXT: v128.load32_lane 0, 0 +; CHECK-NEXT: v128.load32_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %s = getelementptr i32, i32* %p, i32 6 %t = tail call <4 x i32> @llvm.wasm.load32.lane(i32* %s, <4 x i32> %v, i32 0) @@ -594,7 +594,7 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const 42 ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.load32_lane 0, 0 +; CHECK-NEXT: v128.load32_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %s = inttoptr i32 42 to i32* %t = tail call <4 x i32> @llvm.wasm.load32.lane(i32* %s, <4 x i32> %v, i32 0) @@ -608,7 +608,7 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const gv_i32 ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.load32_lane 0, 0 +; CHECK-NEXT: v128.load32_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %t = tail call <4 x i32> @llvm.wasm.load32.lane(i32* @gv_i32, <4 x i32> %v, i32 0) ret <4 x i32> %t @@ -620,7 +620,7 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: local.get 1 ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.store32_lane 0, 0 +; CHECK-NEXT: v128.store32_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return tail call void @llvm.wasm.store32.lane(i32* %p, <4 x i32> %v, i32 0) ret void @@ -634,7 +634,7 @@ ; CHECK-NEXT: i32.const 24 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.store32_lane 0, 0 +; CHECK-NEXT: v128.store32_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %q = ptrtoint i32* %p to i32 %r = add nuw i32 %q, 24 @@ -651,7 +651,7 @@ ; CHECK-NEXT: i32.const 24 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.store32_lane 0, 0 +; CHECK-NEXT: v128.store32_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %s = getelementptr inbounds i32, i32* %p, i32 6 tail call void @llvm.wasm.store32.lane(i32* %s, <4 x i32> %v, i32 0) @@ -666,7 +666,7 @@ ; CHECK-NEXT: i32.const -24 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.store32_lane 0, 0 +; CHECK-NEXT: v128.store32_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %s = getelementptr inbounds i32, i32* %p, i32 -6 tail call void @llvm.wasm.store32.lane(i32* %s, <4 x i32> %v, i32 0) @@ -681,7 +681,7 @@ ; CHECK-NEXT: i32.const 24 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.store32_lane 0, 0 +; CHECK-NEXT: v128.store32_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %q = ptrtoint i32* %p to i32 %r = add nsw i32 %q, 24 @@ -698,7 +698,7 @@ ; CHECK-NEXT: i32.const 24 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.store32_lane 0, 0 +; CHECK-NEXT: v128.store32_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %s = getelementptr i32, i32* %p, i32 6 tail call void @llvm.wasm.store32.lane(i32* %s, <4 x i32> %v, i32 0) @@ -711,7 +711,7 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const 42 ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.store32_lane 0, 0 +; CHECK-NEXT: v128.store32_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %s = inttoptr i32 42 to i32* tail call void @llvm.wasm.store32.lane(i32* %s, <4 x i32> %v, i32 0) @@ -724,7 +724,7 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const gv_i32 ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.store32_lane 0, 0 +; CHECK-NEXT: v128.store32_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return tail call void @llvm.wasm.store32.lane(i32* @gv_i32, <4 x i32> %v, i32 0) ret void @@ -740,7 +740,7 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: local.get 0 ; CHECK-NEXT: local.get 1 -; CHECK-NEXT: v128.load64_lane 0, 0 +; CHECK-NEXT: v128.load64_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %t = tail call <2 x i64> @llvm.wasm.load64.lane(i64* %p, <2 x i64> %v, i32 0) ret <2 x i64> %t @@ -754,7 +754,7 @@ ; CHECK-NEXT: i32.const 24 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 1 -; CHECK-NEXT: v128.load64_lane 0, 0 +; CHECK-NEXT: v128.load64_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %q = ptrtoint i64* %p to i32 %r = add nuw i32 %q, 24 @@ -771,7 +771,7 @@ ; CHECK-NEXT: i32.const 48 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 1 -; CHECK-NEXT: v128.load64_lane 0, 0 +; CHECK-NEXT: v128.load64_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %s = getelementptr inbounds i64, i64* %p, i32 6 %t = tail call <2 x i64> @llvm.wasm.load64.lane(i64* %s, <2 x i64> %v, i32 0) @@ -786,7 +786,7 @@ ; CHECK-NEXT: i32.const -48 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 1 -; CHECK-NEXT: v128.load64_lane 0, 0 +; CHECK-NEXT: v128.load64_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %s = getelementptr inbounds i64, i64* %p, i32 -6 %t = tail call <2 x i64> @llvm.wasm.load64.lane(i64* %s, <2 x i64> %v, i32 0) @@ -801,7 +801,7 @@ ; CHECK-NEXT: i32.const 24 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 1 -; CHECK-NEXT: v128.load64_lane 0, 0 +; CHECK-NEXT: v128.load64_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %q = ptrtoint i64* %p to i32 %r = add nsw i32 %q, 24 @@ -818,7 +818,7 @@ ; CHECK-NEXT: i32.const 48 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 1 -; CHECK-NEXT: v128.load64_lane 0, 0 +; CHECK-NEXT: v128.load64_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %s = getelementptr i64, i64* %p, i32 6 %t = tail call <2 x i64> @llvm.wasm.load64.lane(i64* %s, <2 x i64> %v, i32 0) @@ -831,7 +831,7 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const 42 ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.load64_lane 0, 0 +; CHECK-NEXT: v128.load64_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %s = inttoptr i32 42 to i64* %t = tail call <2 x i64> @llvm.wasm.load64.lane(i64* %s, <2 x i64> %v, i32 0) @@ -845,7 +845,7 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const gv_i64 ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.load64_lane 0, 0 +; CHECK-NEXT: v128.load64_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %t = tail call <2 x i64> @llvm.wasm.load64.lane(i64* @gv_i64, <2 x i64> %v, i32 0) ret <2 x i64> %t @@ -857,7 +857,7 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: local.get 1 ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.store64_lane 0, 0 +; CHECK-NEXT: v128.store64_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return tail call void @llvm.wasm.store64.lane(i64* %p, <2 x i64> %v, i32 0) ret void @@ -871,7 +871,7 @@ ; CHECK-NEXT: i32.const 24 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.store64_lane 0, 0 +; CHECK-NEXT: v128.store64_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %q = ptrtoint i64* %p to i32 %r = add nuw i32 %q, 24 @@ -888,7 +888,7 @@ ; CHECK-NEXT: i32.const 48 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.store64_lane 0, 0 +; CHECK-NEXT: v128.store64_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %s = getelementptr inbounds i64, i64* %p, i32 6 tail call void @llvm.wasm.store64.lane(i64* %s, <2 x i64> %v, i32 0) @@ -903,7 +903,7 @@ ; CHECK-NEXT: i32.const -48 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.store64_lane 0, 0 +; CHECK-NEXT: v128.store64_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %s = getelementptr inbounds i64, i64* %p, i32 -6 tail call void @llvm.wasm.store64.lane(i64* %s, <2 x i64> %v, i32 0) @@ -918,7 +918,7 @@ ; CHECK-NEXT: i32.const 24 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.store64_lane 0, 0 +; CHECK-NEXT: v128.store64_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %q = ptrtoint i64* %p to i32 %r = add nsw i32 %q, 24 @@ -935,7 +935,7 @@ ; CHECK-NEXT: i32.const 48 ; CHECK-NEXT: i32.add ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.store64_lane 0, 0 +; CHECK-NEXT: v128.store64_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %s = getelementptr i64, i64* %p, i32 6 tail call void @llvm.wasm.store64.lane(i64* %s, <2 x i64> %v, i32 0) @@ -948,7 +948,7 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const 42 ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.store64_lane 0, 0 +; CHECK-NEXT: v128.store64_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return %s = inttoptr i32 42 to i64* tail call void @llvm.wasm.store64.lane(i64* %s, <2 x i64> %v, i32 0) @@ -961,7 +961,7 @@ ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const gv_i64 ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.store64_lane 0, 0 +; CHECK-NEXT: v128.store64_lane 0:p2align=0, 0 ; CHECK-NEXT: # fallthrough-return tail call void @llvm.wasm.store64.lane(i64* @gv_i64, <2 x i64> %v, i32 0) ret void diff --git a/llvm/test/CodeGen/WebAssembly/simd-load-zero-offset.ll b/llvm/test/CodeGen/WebAssembly/simd-load-zero-offset.ll --- a/llvm/test/CodeGen/WebAssembly/simd-load-zero-offset.ll +++ b/llvm/test/CodeGen/WebAssembly/simd-load-zero-offset.ll @@ -18,7 +18,7 @@ ; CHECK: .functype load_zero_i32_no_offset (i32) -> (v128) ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.load32_zero 0 +; CHECK-NEXT: v128.load32_zero 0:p2align=0 ; CHECK-NEXT: # fallthrough-return %v = tail call <4 x i32> @llvm.wasm.load32.zero(i32* %p) ret <4 x i32> %v @@ -29,7 +29,7 @@ ; CHECK: .functype load_zero_i32_with_folded_offset (i32) -> (v128) ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.load32_zero 24 +; CHECK-NEXT: v128.load32_zero 24:p2align=0 ; CHECK-NEXT: # fallthrough-return %q = ptrtoint i32* %p to i32 %r = add nuw i32 %q, 24 @@ -43,7 +43,7 @@ ; CHECK: .functype load_zero_i32_with_folded_gep_offset (i32) -> (v128) ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.load32_zero 24 +; CHECK-NEXT: v128.load32_zero 24:p2align=0 ; CHECK-NEXT: # fallthrough-return %s = getelementptr inbounds i32, i32* %p, i32 6 %t = tail call <4 x i32> @llvm.wasm.load32.zero(i32* %s) @@ -57,7 +57,7 @@ ; CHECK-NEXT: local.get 0 ; CHECK-NEXT: i32.const -24 ; CHECK-NEXT: i32.add -; CHECK-NEXT: v128.load32_zero 0 +; CHECK-NEXT: v128.load32_zero 0:p2align=0 ; CHECK-NEXT: # fallthrough-return %s = getelementptr inbounds i32, i32* %p, i32 -6 %t = tail call <4 x i32> @llvm.wasm.load32.zero(i32* %s) @@ -71,7 +71,7 @@ ; CHECK-NEXT: local.get 0 ; CHECK-NEXT: i32.const 24 ; CHECK-NEXT: i32.add -; CHECK-NEXT: v128.load32_zero 0 +; CHECK-NEXT: v128.load32_zero 0:p2align=0 ; CHECK-NEXT: # fallthrough-return %q = ptrtoint i32* %p to i32 %r = add nsw i32 %q, 24 @@ -87,7 +87,7 @@ ; CHECK-NEXT: local.get 0 ; CHECK-NEXT: i32.const 24 ; CHECK-NEXT: i32.add -; CHECK-NEXT: v128.load32_zero 0 +; CHECK-NEXT: v128.load32_zero 0:p2align=0 ; CHECK-NEXT: # fallthrough-return %s = getelementptr i32, i32* %p, i32 6 %t = tail call <4 x i32> @llvm.wasm.load32.zero(i32* %s) @@ -99,7 +99,7 @@ ; CHECK: .functype load_zero_i32_from_numeric_address () -> (v128) ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const 0 -; CHECK-NEXT: v128.load32_zero 42 +; CHECK-NEXT: v128.load32_zero 42:p2align=0 ; CHECK-NEXT: # fallthrough-return %s = inttoptr i32 42 to i32* %t = tail call <4 x i32> @llvm.wasm.load32.zero(i32* %s) @@ -112,7 +112,7 @@ ; CHECK: .functype load_zero_i32_from_global_address () -> (v128) ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const 0 -; CHECK-NEXT: v128.load32_zero gv_i32 +; CHECK-NEXT: v128.load32_zero gv_i32:p2align=0 ; CHECK-NEXT: # fallthrough-return %t = tail call <4 x i32> @llvm.wasm.load32.zero(i32* @gv_i32) ret <4 x i32> %t @@ -127,7 +127,7 @@ ; CHECK: .functype load_zero_i64_no_offset (i32) -> (v128) ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.load64_zero 0 +; CHECK-NEXT: v128.load64_zero 0:p2align=0 ; CHECK-NEXT: # fallthrough-return %v = tail call <2 x i64> @llvm.wasm.load64.zero(i64* %p) ret <2 x i64> %v @@ -138,7 +138,7 @@ ; CHECK: .functype load_zero_i64_with_folded_offset (i32) -> (v128) ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.load64_zero 24 +; CHECK-NEXT: v128.load64_zero 24:p2align=0 ; CHECK-NEXT: # fallthrough-return %q = ptrtoint i64* %p to i32 %r = add nuw i32 %q, 24 @@ -152,7 +152,7 @@ ; CHECK: .functype load_zero_i64_with_folded_gep_offset (i32) -> (v128) ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: local.get 0 -; CHECK-NEXT: v128.load64_zero 48 +; CHECK-NEXT: v128.load64_zero 48:p2align=0 ; CHECK-NEXT: # fallthrough-return %s = getelementptr inbounds i64, i64* %p, i64 6 %t = tail call <2 x i64> @llvm.wasm.load64.zero(i64* %s) @@ -166,7 +166,7 @@ ; CHECK-NEXT: local.get 0 ; CHECK-NEXT: i32.const -48 ; CHECK-NEXT: i32.add -; CHECK-NEXT: v128.load64_zero 0 +; CHECK-NEXT: v128.load64_zero 0:p2align=0 ; CHECK-NEXT: # fallthrough-return %s = getelementptr inbounds i64, i64* %p, i64 -6 %t = tail call <2 x i64> @llvm.wasm.load64.zero(i64* %s) @@ -180,7 +180,7 @@ ; CHECK-NEXT: local.get 0 ; CHECK-NEXT: i32.const 24 ; CHECK-NEXT: i32.add -; CHECK-NEXT: v128.load64_zero 0 +; CHECK-NEXT: v128.load64_zero 0:p2align=0 ; CHECK-NEXT: # fallthrough-return %q = ptrtoint i64* %p to i32 %r = add nsw i32 %q, 24 @@ -196,7 +196,7 @@ ; CHECK-NEXT: local.get 0 ; CHECK-NEXT: i32.const 48 ; CHECK-NEXT: i32.add -; CHECK-NEXT: v128.load64_zero 0 +; CHECK-NEXT: v128.load64_zero 0:p2align=0 ; CHECK-NEXT: # fallthrough-return %s = getelementptr i64, i64* %p, i64 6 %t = tail call <2 x i64> @llvm.wasm.load64.zero(i64* %s) @@ -208,7 +208,7 @@ ; CHECK: .functype load_zero_i64_from_numeric_address () -> (v128) ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const 0 -; CHECK-NEXT: v128.load64_zero 42 +; CHECK-NEXT: v128.load64_zero 42:p2align=0 ; CHECK-NEXT: # fallthrough-return %s = inttoptr i32 42 to i64* %t = tail call <2 x i64> @llvm.wasm.load64.zero(i64* %s) @@ -221,7 +221,7 @@ ; CHECK: .functype load_zero_i64_from_global_address () -> (v128) ; CHECK-NEXT: # %bb.0: ; CHECK-NEXT: i32.const 0 -; CHECK-NEXT: v128.load64_zero gv_i64 +; CHECK-NEXT: v128.load64_zero gv_i64:p2align=0 ; CHECK-NEXT: # fallthrough-return %t = tail call <2 x i64> @llvm.wasm.load64.zero(i64* @gv_i64) ret <2 x i64> %t