File: fake-use-vector.ll

package info (click to toggle)
llvm-toolchain-20 1%3A20.1.6-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,111,304 kB
  • sloc: cpp: 7,438,677; ansic: 1,393,822; asm: 1,012,926; python: 241,650; f90: 86,635; objc: 75,479; lisp: 42,144; pascal: 17,286; sh: 10,027; ml: 5,082; perl: 4,730; awk: 3,523; makefile: 3,349; javascript: 2,251; xml: 892; fortran: 672
file content (39 lines) | stat: -rw-r--r-- 1,298 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
35
36
37
38
39
; assert in DAGlegalizer with fake use of 1-element vectors.
; RUN: llc -stop-after=finalize-isel -mtriple=x86_64-unknown-linux -filetype=asm -o - %s | FileCheck %s
;
; ModuleID = 't2.cpp'
; source_filename = "t2.cpp"
; target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
;
; Check that we get past ISel and generate FAKE_USE machine instructions for
; one-element vectors.
;
; CHECK:       bb.0.entry:
; CHECK-DAG:   %1:gr64 = COPY $rdi
; CHECK-DAG:   %0:vr128 = COPY $xmm0
; CHECK:       %2:vr64 =
; CHECK-DAG:   FAKE_USE %1
; CHECK-DAG:   FAKE_USE %0
; CHECK:       RET


target triple = "x86_64-unknown-unknown"

; Function Attrs: nounwind sspstrong uwtable
define <4 x float> @_Z3runDv4_fDv1_x(<4 x float> %r, i64 %b.coerce) local_unnamed_addr #0 {
entry:
  %0 = insertelement <1 x i64> undef, i64 %b.coerce, i32 0
  %1 = bitcast i64 %b.coerce to <1 x i64>
  %2 = tail call <4 x float> @llvm.x86.sse.cvtpi2ps(<4 x float> %r, <1 x i64> %1)
  tail call void (...) @llvm.fake.use(<1 x i64> %0)
  tail call void (...) @llvm.fake.use(<4 x float> %r)
  ret <4 x float> %2
}

; Function Attrs: nounwind readnone
declare <4 x float> @llvm.x86.sse.cvtpi2ps(<4 x float>, <1 x i64>)

; Function Attrs: nounwind
declare void @llvm.fake.use(...)

attributes #0 = { "target-cpu"="btver2" optdebug }