File: avx512-bugfix-23634.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 1,998,492 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (46 lines) | stat: -rw-r--r-- 2,447 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
43
44
45
46
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=knl | FileCheck %s

target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

define void @f_fu(ptr %ret, ptr  %aa, float %b) {
; CHECK-LABEL: f_fu:
; CHECK:       ## %bb.0: ## %allocas
; CHECK-NEXT:    vcvttss2si %xmm0, %eax
; CHECK-NEXT:    vpbroadcastd %eax, %zmm0
; CHECK-NEXT:    vcvttps2dq (%rsi), %zmm1
; CHECK-NEXT:    vpsrld $31, %zmm0, %zmm2
; CHECK-NEXT:    vpaddd %zmm2, %zmm0, %zmm2
; CHECK-NEXT:    vpsrad $1, %zmm2, %zmm2
; CHECK-NEXT:    movw $-21846, %ax ## imm = 0xAAAA
; CHECK-NEXT:    kmovw %eax, %k1
; CHECK-NEXT:    vmovdqa32 {{.*#+}} zmm1 {%k1} = [u,3,u,5,u,7,u,9,u,11,u,13,u,15,u,17]
; CHECK-NEXT:    vpaddd %zmm0, %zmm2, %zmm0
; CHECK-NEXT:    vpaddd %zmm1, %zmm0, %zmm0
; CHECK-NEXT:    vcvtdq2ps %zmm0, %zmm0
; CHECK-NEXT:    vmovups %zmm0, (%rdi)
; CHECK-NEXT:    retq
allocas:
  %ptr_masked_load.39 = load <16 x float>, ptr %aa, align 4
  %b_load_to_int32 = fptosi float %b to i32
  %b_load_to_int32_broadcast_init = insertelement <16 x i32> undef, i32 %b_load_to_int32, i32 0
  %b_load_to_int32_broadcast = shufflevector <16 x i32> %b_load_to_int32_broadcast_init, <16 x i32> undef, <16 x i32> zeroinitializer
  %b_to_int32 = fptosi float %b to i32
  %b_to_int32_broadcast_init = insertelement <16 x i32> undef, i32 %b_to_int32, i32 0
  %b_to_int32_broadcast = shufflevector <16 x i32> %b_to_int32_broadcast_init, <16 x i32> undef, <16 x i32> zeroinitializer

  %a_load_to_int32 = fptosi <16 x float> %ptr_masked_load.39 to <16 x i32>
  %div_v019_load_ = sdiv <16 x i32> %b_to_int32_broadcast, <i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2>

  %v1.i = select <16 x i1> <i1 false, i1 true, i1 false, i1 true, i1 false, i1 true, i1 false, i1 true, i1 false, i1 true, i1 false, i1 true, i1 false, i1 true, i1 false, i1 true>, <16 x i32> <i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17>, <16 x i32> %a_load_to_int32

  %foo_test = add <16 x i32> %div_v019_load_, %b_load_to_int32_broadcast


  %add_struct_offset_y_struct_offset33_x = add <16 x i32> %foo_test, %v1.i

  %val = sitofp <16 x i32> %add_struct_offset_y_struct_offset33_x to <16 x float>
  store <16 x float> %val, ptr %ret, align 4
  ret void
}