File: pr2645-0.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 (34 lines) | stat: -rw-r--r-- 1,625 bytes parent folder | download | duplicates (6)
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
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -instcombine -S | grep "insertelement <4 x float> poison"

; Instcombine should be able to prove that none of the
; insertelement's first operand's elements are needed.

define internal void @""(i8*) {
; <label>:1
        bitcast i8* %0 to i32*          ; <i32*>:2 [#uses=1]
        load i32, i32* %2, align 1           ; <i32>:3 [#uses=1]
        getelementptr i8, i8* %0, i32 4             ; <i8*>:4 [#uses=1]
        bitcast i8* %4 to i32*          ; <i32*>:5 [#uses=1]
        load i32, i32* %5, align 1           ; <i32>:6 [#uses=1]
        br label %7

; <label>:7             ; preds = %9, %1
        %.01 = phi <4 x float> [ undef, %1 ], [ %12, %9 ]               ; <<4 x float>> [#uses=1]
        %.0 = phi i32 [ %3, %1 ], [ %15, %9 ]           ; <i32> [#uses=3]
        icmp slt i32 %.0, %6            ; <i1>:8 [#uses=1]
        br i1 %8, label %9, label %16

; <label>:9             ; preds = %7
        sitofp i32 %.0 to float         ; <float>:10 [#uses=1]
        insertelement <4 x float> %.01, float %10, i32 0                ; <<4 x float>>:11 [#uses=1]
        shufflevector <4 x float> %11, <4 x float> undef, <4 x i32> zeroinitializer             ; <<4 x float>>:12 [#uses=2]
        getelementptr i8, i8* %0, i32 48            ; <i8*>:13 [#uses=1]
        bitcast i8* %13 to <4 x float>*         ; <<4 x float>*>:14 [#uses=1]
        store <4 x float> %12, <4 x float>* %14, align 16
        add i32 %.0, 2          ; <i32>:15 [#uses=1]
        br label %7

; <label>:16            ; preds = %7
        ret void
}