File: simd-noopt.ll

package info (click to toggle)
llvm-toolchain-9 1%3A9.0.1-16
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 882,436 kB
  • sloc: cpp: 4,167,636; ansic: 714,256; asm: 457,610; python: 155,927; objc: 65,094; sh: 42,856; lisp: 26,908; perl: 7,786; pascal: 7,722; makefile: 6,881; ml: 5,581; awk: 3,648; cs: 2,027; xml: 888; javascript: 381; ruby: 156
file content (20 lines) | stat: -rw-r--r-- 829 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
; RUN: llc < %s -fast-isel -mattr=+simd128,+sign-ext -verify-machineinstrs

;; Ensures fastisel produces valid code when storing and loading split
;; up v2i64 values. Lowering away v2i64s is a temporary measure while
;; V8 does not have support for i64x2.* operations, and is done when
;; -wasm-enable-unimplemented-simd is not present. This is a
;; regression test for a bug that crashed llc after fastisel produced
;; machineinstrs that used registers that had never been defined.

target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
target triple = "wasm32-unknown-unknown"

define i64 @foo(<2 x i64> %vec) {
entry:
  %vec.addr = alloca <2 x i64>, align 16
  store <2 x i64> %vec, <2 x i64>* %vec.addr, align 16
  %0 = load <2 x i64>, <2 x i64>* %vec.addr, align 16
  %1 = extractelement <2 x i64> %0, i32 0
  ret i64 %1
}