File: simd-nonconst-sext.ll

package info (click to toggle)
llvm-toolchain-13 1%3A13.0.1-11
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,418,840 kB
  • sloc: cpp: 5,290,826; ansic: 996,570; asm: 544,593; python: 188,212; objc: 72,027; lisp: 30,291; f90: 25,395; sh: 24,898; javascript: 9,780; pascal: 9,398; perl: 7,484; ml: 5,432; awk: 3,523; makefile: 2,913; xml: 953; cs: 573; fortran: 539
file content (19 lines) | stat: -rw-r--r-- 623 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -mattr=+simd128 | FileCheck %s

; A regression test for a bug in the lowering of SIGN_EXTEND_INREG
; with SIMD and without sign-ext where ISel would crash if the index
; of the vector extract was not a constant.

target triple = "wasm32"

; CHECK-LABEL: foo:
; CHECK-NEXT: .functype foo () -> (f32)
; CHECK: i32x4.load16x4_u
; CHECK: f32.convert_i32_s
define float @foo() {
  %1 = load <4 x i16>, <4 x i16>* undef, align 8
  %2 = load i32, i32* undef, align 4
  %vecext = extractelement <4 x i16> %1, i32 %2
  %conv = sitofp i16 %vecext to float
  ret float %conv
}