llvm/llvm/test/CodeGen/SystemZ/pr47019.ll

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 -O3 | FileCheck %s

target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64"

@g_150 = external dso_local unnamed_addr global [9 x i32], align 4
@g_317 = external dso_local unnamed_addr global [1 x [10 x [8 x i32]]], align 4

define dso_local void @main() local_unnamed_addr {
; CHECK-LABEL: main:
; CHECK:       # %bb.0: # %bb
; CHECK-NEXT:    lhi %r0, 0
; CHECK-NEXT:    strl %r0, g_317+296
; CHECK-NEXT:    lhi %r0, 6
; CHECK-NEXT:    strl %r0, g_150+12
bb:
  br label %bb1

bb1:                                              ; preds = %bb1, %bb
  br i1 undef, label %bb2, label %bb1

bb2:                                              ; preds = %bb1
  store i32 0, ptr getelementptr inbounds ([1 x [10 x [8 x i32]]], ptr @g_317, i64 0, i64 0, i64 9, i64 2), align 4
  %i = load i32, ptr getelementptr inbounds ([1 x [10 x [8 x i32]]], ptr @g_317, i64 0, i64 0, i64 9, i64 2), align 4
  %i3 = insertelement <8 x i32> undef, i32 %i, i32 0
  %i4 = shufflevector <8 x i32> %i3, <8 x i32> undef, <8 x i32> zeroinitializer
  %i5 = add nsw <8 x i8> zeroinitializer, <i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6>
  %i6 = zext <8 x i8> %i5 to <8 x i32>
  %i7 = icmp slt <8 x i32> undef, %i6
  %i8 = or <8 x i1> zeroinitializer, %i7
  %i9 = select <8 x i1> %i8, <8 x i32> zeroinitializer, <8 x i32> %i4
  %i10 = shl <8 x i32> %i6, %i9
  %i11 = xor <8 x i32> %i10, zeroinitializer
  %i12 = xor <8 x i32> %i11, zeroinitializer
  %i13 = xor <8 x i32> %i12, zeroinitializer
  %i14 = extractelement <8 x i32> %i13, i32 0
  %i15 = xor i32 %i14, 0
  %i16 = xor i32 %i15, 0
  %i17 = shl i32 %i16, 24
  %i18 = ashr exact i32 %i17, 24
  store i32 %i18, ptr getelementptr inbounds ([9 x i32], ptr @g_150, i64 0, i64 3), align 4
  unreachable
}

attributes #0 = { "use-soft-float"="false" }