File: trunced-buildvector-scalar-extended.ll

package info (click to toggle)
llvm-toolchain-snapshot 1%3A22~%2B%2B20250731080150%2Bbe449d6b6587-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,250,472 kB
  • sloc: cpp: 7,641,756; ansic: 1,439,220; asm: 1,072,591; python: 253,178; f90: 95,173; objc: 70,722; lisp: 44,365; pascal: 18,720; sh: 10,051; ml: 5,111; perl: 4,720; awk: 3,523; makefile: 3,397; javascript: 2,272; xml: 892; fortran: 783
file content (42 lines) | stat: -rw-r--r-- 1,748 bytes parent folder | download | duplicates (7)
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
41
42
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
; RUN: opt -S --passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s

define <4 x float> @test(i64 %0) {
; CHECK-LABEL: define <4 x float> @test(
; CHECK-SAME: i64 [[TMP0:%.*]]) {
; CHECK-NEXT:  [[ENTRY:.*:]]
; CHECK-NEXT:    [[TMP3:%.*]] = insertelement <4 x i64> <i64 0, i64 0, i64 poison, i64 0>, i64 [[TMP0]], i32 2
; CHECK-NEXT:    [[TMP2:%.*]] = trunc <4 x i64> [[TMP3]] to <4 x i32>
; CHECK-NEXT:    [[TMP4:%.*]] = sitofp <4 x i64> [[TMP3]] to <4 x float>
; CHECK-NEXT:    [[TMP5:%.*]] = sitofp <4 x i32> [[TMP2]] to <4 x float>
; CHECK-NEXT:    [[TMP6:%.*]] = fadd <4 x float> [[TMP4]], [[TMP5]]
; CHECK-NEXT:    [[TMP7:%.*]] = fcmp ogt <4 x float> [[TMP6]], zeroinitializer
; CHECK-NEXT:    ret <4 x float> [[TMP6]]
;
entry:
  %1 = trunc i64 0 to i32
  %2 = sitofp i32 %1 to float
  %3 = sitofp i64 0 to float
  %4 = fadd float %3, %2
  %to_max.i = fcmp ogt float %4, 0.000000e+00
  %5 = trunc i64 0 to i32
  %6 = sitofp i32 %5 to float
  %7 = sitofp i64 0 to float
  %8 = fadd float %7, %6
  %to_max.i.1 = fcmp ogt float %8, 0.000000e+00
  %9 = trunc i64 %0 to i32
  %10 = sitofp i32 %9 to float
  %11 = sitofp i64 %0 to float
  %12 = fadd float %11, %10
  %to_max.i.2 = fcmp ogt float %12, 0.000000e+00
  %13 = trunc i64 0 to i32
  %14 = sitofp i32 %13 to float
  %15 = sitofp i64 0 to float
  %16 = fadd float %15, %14
  %to_max.i.3 = fcmp ogt float %16, 0.000000e+00
  %r0 = insertelement <4 x float> poison, float %4, i32 0
  %r1 = insertelement <4 x float> %r0, float %8, i32 1
  %r2 = insertelement <4 x float> %r1, float %12, i32 2
  %r3 = insertelement <4 x float> %r2, float %16, i32 3
  ret <4 x float> %r3
}