File: order-bug-inseltpoison.ll

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (23 lines) | stat: -rw-r--r-- 817 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
; RUN: opt %s -passes='function(scalarizer)' -S -o - | FileCheck %s

; This input caused the scalarizer to replace & erase gathered results when 
; future gathered results depended on them being alive

define dllexport spir_func <4 x i32> @main(float %a) {
entry:
  %i = insertelement <4 x float> poison, float %a, i32 0
  br label %z

y:
; CHECK: %f.upto0 = insertelement <4 x i32> poison, i32 %b.i0, i32 0
; CHECK: %f.upto1 = insertelement <4 x i32> %f.upto0, i32 %b.i0, i32 1
; CHECK: %f.upto2 = insertelement <4 x i32> %f.upto1, i32 %b.i0, i32 2
; CHECK: %f = insertelement <4 x i32> %f.upto2, i32 %b.i0, i32 3
  %f = shufflevector <4 x i32> %b, <4 x i32> poison, <4 x i32> zeroinitializer
  ret <4 x i32> %f

z:
; CHECK: %b.i0 = bitcast float %a to i32
  %b = bitcast <4 x float> %i to <4 x i32>
  br label %y
}