1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 12:43:36 +01:00
llvm-mirror/test/CodeGen/WebAssembly/pr47375.ll
Thomas Lively 81bb5f99ad [WebAssembly] Remove datalayout strings from llc tests
The data layout strings do not have any effect on llc tests and will become
misleadingly out of date as we continue to update the canonical data layout, so
remove them from the tests.

Differential Revision: https://reviews.llvm.org/D105842
2021-07-14 11:17:08 -07:00

36 lines
1.1 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s | FileCheck %s
target triple = "wasm32-unknown-unknown"
; Regression test for pr47375, in which an assertion was triggering
; because WebAssemblyTargetLowering::isVectorLoadExtDesirable was
; improperly assuming the use of simple value types.
define void @sext_vec() {
; CHECK-LABEL: sext_vec:
; CHECK: .functype sext_vec () -> ()
; 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 0
; CHECK-NEXT: i32.store8 0
; CHECK-NEXT: local.get 0
; CHECK-NEXT: local.get 0
; CHECK-NEXT: local.get 0
; CHECK-NEXT: i32.const 7
; CHECK-NEXT: i32.shl
; CHECK-NEXT: i32.or
; CHECK-NEXT: i32.const 7175
; CHECK-NEXT: i32.and
; CHECK-NEXT: i32.store16 0
; CHECK-NEXT: # fallthrough-return
%L1 = load <2 x i3>, <2 x i3>* undef, align 2
%zext = zext <2 x i3> %L1 to <2 x i10>
store <2 x i10> %zext, <2 x i10>* undef, align 4
ret void
}