File: powi-regression.ll

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (44 lines) | stat: -rw-r--r-- 2,037 bytes parent folder | download | duplicates (10)
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
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -mtriple=x86_64-linux-gnu -mcpu=x86-64-v2 -passes=slp-vectorizer -S | FileCheck %s

; FIXME: Ensure llvm.powi.* intrinsics are vectorized.

define <2 x double> @PR53887_v2f64(<2 x double> noundef %x) {
; CHECK-LABEL: @PR53887_v2f64(
; CHECK-NEXT:  entry:
; CHECK-NEXT:    [[TMP0:%.*]] = call fast <2 x double> @llvm.powi.v2f64.i32(<2 x double> [[X:%.*]], i32 6)
; CHECK-NEXT:    ret <2 x double> [[TMP0]]
;
entry:
  %vecext = extractelement <2 x double> %x, i64 0
  %0 = tail call fast double @llvm.powi.f64.i32(double %vecext, i32 6)
  %vecinit = insertelement <2 x double> undef, double %0, i64 0
  %vecext1 = extractelement <2 x double> %x, i64 1
  %1 = tail call fast double @llvm.powi.f64.i32(double %vecext1, i32 6)
  %vecinit3 = insertelement <2 x double> %vecinit, double %1, i64 1
  ret <2 x double> %vecinit3
}

define <4 x double> @PR53887_v4f64(<4 x double> noundef %x) {
; CHECK-LABEL: @PR53887_v4f64(
; CHECK-NEXT:  entry:
; CHECK-NEXT:    [[TMP0:%.*]] = call fast <4 x double> @llvm.powi.v4f64.i32(<4 x double> [[X:%.*]], i32 6)
; CHECK-NEXT:    ret <4 x double> [[TMP0]]
;
entry:
  %vecext = extractelement <4 x double> %x, i64 0
  %0 = tail call fast double @llvm.powi.f64.i32(double %vecext, i32 6) #2
  %vecinit = insertelement <4 x double> undef, double %0, i64 0
  %vecext1 = extractelement <4 x double> %x, i64 1
  %1 = tail call fast double @llvm.powi.f64.i32(double %vecext1, i32 6) #2
  %vecinit3 = insertelement <4 x double> %vecinit, double %1, i64 1
  %vecext4 = extractelement <4 x double> %x, i64 2
  %2 = tail call fast double @llvm.powi.f64.i32(double %vecext4, i32 6) #2
  %vecinit6 = insertelement <4 x double> %vecinit3, double %2, i64 2
  %vecext7 = extractelement <4 x double> %x, i64 3
  %3 = tail call fast double @llvm.powi.f64.i32(double %vecext7, i32 6) #2
  %vecinit9 = insertelement <4 x double> %vecinit6, double %3, i64 3
  ret <4 x double> %vecinit9
}

declare double @llvm.powi.f64.i32(double, i32)