1 ; RUN: llc < %s -mattr=+simd128,+sign-ext -verify-machineinstrs
3 ;; Ensures fastisel produces valid code when storing and loading split
4 ;; up v2i64 values. This is a regression test for a bug that crashed
5 ;; llc after fastisel produced machineinstrs that used registers that
6 ;; had never been defined.
8 target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
9 target triple = "wasm32-unknown-unknown-wasm"
11 define i64 @foo(<2 x i64> %vec) #0 {
13 %vec.addr = alloca <2 x i64>, align 16
14 store <2 x i64> %vec, <2 x i64>* %vec.addr, align 16
15 %0 = load <2 x i64>, <2 x i64>* %vec.addr, align 16
16 %1 = extractelement <2 x i64> %0, i32 0
20 attributes #0 = { noinline optnone }