~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/Transforms/SLPVectorizer/X86/ordering.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2015-07-15 17:51:08 UTC
  • Revision ID: package-import@ubuntu.com-20150715175108-l8mynwovkx4zx697
Tags: upstream-3.7~+rc2
ImportĀ upstreamĀ versionĀ 3.7~+rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: opt < %s -basicaa -slp-vectorizer -dce -S -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7
 
2
 
 
3
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
 
4
target triple = "x86_64-apple-macosx10.8.0"
 
5
 
 
6
define void @updateModelQPFrame(i32 %m_Bits) {
 
7
entry:
 
8
  %0 = load double, double* undef, align 8
 
9
  %mul = fmul double undef, %0
 
10
  %mul2 = fmul double undef, %mul
 
11
  %mul4 = fmul double %0, %mul2
 
12
  %mul5 = fmul double undef, 4.000000e+00
 
13
  %mul7 = fmul double undef, %mul5
 
14
  %conv = sitofp i32 %m_Bits to double
 
15
  %mul8 = fmul double %conv, %mul7
 
16
  %add = fadd double %mul4, %mul8
 
17
  %cmp11 = fcmp olt double %add, 0.000000e+00
 
18
  ret void
 
19
}
 
20
 
 
21
declare i8* @objc_msgSend(i8*, i8*, ...)
 
22
declare i32 @personality_v0(...)
 
23
 
 
24
define void @invoketest() personality i8* bitcast (i32 (...)* @personality_v0 to i8*) {
 
25
entry:
 
26
  br i1 undef, label %cond.true, label %cond.false
 
27
 
 
28
cond.true:
 
29
  %call49 = invoke double bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to double (i8*, i8*)*)(i8* undef, i8* undef) 
 
30
          to label %cond.true54 unwind label %lpad
 
31
 
 
32
cond.false:
 
33
  %call51 = invoke double bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to double (i8*, i8*)*)(i8* undef, i8* undef)
 
34
          to label %cond.false57 unwind label %lpad
 
35
 
 
36
cond.true54:
 
37
  %call56 = invoke double bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to double (i8*, i8*)*)(i8* undef, i8* undef) 
 
38
          to label %cond.end60 unwind label %lpad
 
39
 
 
40
cond.false57:
 
41
  %call59 = invoke double bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to double (i8*, i8*)*)(i8* undef, i8* undef)
 
42
          to label %cond.end60 unwind label %lpad
 
43
 
 
44
; Make sure we don't vectorize these phis - they have invokes as inputs.
 
45
 
 
46
; RUN: opt < %s -slp-vectorizer -S -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7 | FileCheck %s
 
47
 
 
48
; CHECK-LABEL: invoketest
 
49
 
 
50
; CHECK-LABEL: cond.end60
 
51
; CHECK-NEXT-NOT: phi <2 x double>
 
52
; CHECK: insertelement
 
53
; CHECK-LABEL: if.then63
 
54
 
 
55
cond.end60:
 
56
  %cond126 = phi double [ %call49, %cond.true54 ], [ %call51, %cond.false57 ]
 
57
  %cond61 = phi double [ %call56, %cond.true54 ], [ %call59, %cond.false57 ]
 
58
  br i1 undef, label %if.end98, label %if.then63
 
59
 
 
60
if.then63:
 
61
  %conv69 = fptrunc double undef to float
 
62
  %conv70 = fpext float %conv69 to double
 
63
  %div71 = fdiv double %cond126, %conv70
 
64
  %conv78 = fptrunc double undef to float
 
65
  %conv79 = fpext float %conv78 to double
 
66
  %div80 = fdiv double %cond61, %conv79
 
67
  br label %if.end98
 
68
 
 
69
lpad:
 
70
  %l = landingpad { i8*, i32 }
 
71
          cleanup
 
72
  resume { i8*, i32 } %l
 
73
 
 
74
if.end98:
 
75
  %dimensionsResult.sroa.0.0 = phi double [ %div71, %if.then63 ], [ %cond126, %cond.end60 ]
 
76
  %dimensionsResult.sroa.6.0 = phi double [ %div80, %if.then63 ], [ %cond61, %cond.end60 ]
 
77
  br label %if.end99
 
78
 
 
79
if.end99:
 
80
  ret void
 
81
}