File: legalize-shuffle-vector-widen-crash.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-19
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,999,616 kB
  • sloc: cpp: 6,951,724; ansic: 1,486,157; asm: 913,598; python: 232,059; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,079; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,430; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (40 lines) | stat: -rw-r--r-- 1,448 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
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
; RUN: llc -global-isel -o - %s | FileCheck %s
target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
target triple = "arm64-apple-macosx11.0.0"

declare i32 @llvm.aarch64.neon.uaddv.i32.v4i32(<4 x i32>) #0

define i32 @bar() {
; CHECK-LABEL: bar:
; CHECK:       ; %bb.0: ; %bb
; CHECK-NEXT:    movi.2d v0, #0000000000000000
; CHECK-NEXT:    mov b1, v0[1]
; CHECK-NEXT:    mov b2, v0[2]
; CHECK-NEXT:    mov b3, v0[3]
; CHECK-NEXT:    mov.h v0[1], v1[0]
; CHECK-NEXT:    mov.h v2[1], v3[0]
; CHECK-NEXT:    ushll.4s v0, v0, #0
; CHECK-NEXT:    ushll.4s v1, v2, #0
; CHECK-NEXT:    mov.d v0[1], v1[0]
; CHECK-NEXT:    movi.4s v1, #1
; CHECK-NEXT:    and.16b v0, v0, v1
; CHECK-NEXT:    addv.4s s0, v0
; CHECK-NEXT:    fmov w0, s0
; CHECK-NEXT:    ret
bb:
  %shufflevector = shufflevector <8 x i1> zeroinitializer, <8 x i1> zeroinitializer, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
  %zext = zext <4 x i1> %shufflevector to <4 x i32>
  %call = call i32 @llvm.aarch64.neon.uaddv.i32.v4i32(<4 x i32> %zext)
  %icmp = icmp eq i32 %call, 0
  br i1 %icmp, label %bb1, label %bb2

bb1:                                              ; preds = %bb2, %bb
  ret i32 %call

bb2:                                              ; preds = %bb
  %sext = sext i32 0 to i64
  br label %bb1
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(none) }