llvm.org GIT mirror llvm / 7925bcf
[NFC][SLP] Pre-commit unary FNeg test to X86/phi3.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363937 91177308-0d34-0410-b5e6-96231b3b80d8 Cameron McInally 25 days ago
1 changed file(s) with 41 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
5050 ret void
5151 }
5252
53 define void @Rf_GReset_unary_fneg() {
54 ; CHECK-LABEL: @Rf_GReset_unary_fneg(
55 ; CHECK-NEXT: entry:
56 ; CHECK-NEXT: [[SUB:%.*]] = fneg double undef
57 ; CHECK-NEXT: [[TMP0:%.*]] = load double, double* @d, align 8
58 ; CHECK-NEXT: [[SUB1:%.*]] = fneg double [[TMP0]]
59 ; CHECK-NEXT: br i1 icmp eq (%struct.GPar.0.16.26* (...)* inttoptr (i64 115 to %struct.GPar.0.16.26* (...)*), %struct.GPar.0.16.26* (...)* @Rf_gpptr), label [[IF_THEN:%.*]], label [[IF_END7:%.*]]
60 ; CHECK: if.then:
61 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x double> undef, double [[SUB]], i32 0
62 ; CHECK-NEXT: [[TMP2:%.*]] = insertelement <2 x double> [[TMP1]], double [[SUB1]], i32 1
63 ; CHECK-NEXT: [[TMP3:%.*]] = fsub <2 x double> [[TMP2]], undef
64 ; CHECK-NEXT: [[TMP4:%.*]] = fdiv <2 x double> [[TMP3]], undef
65 ; CHECK-NEXT: [[TMP5:%.*]] = extractelement <2 x double> [[TMP4]], i32 0
66 ; CHECK-NEXT: [[TMP6:%.*]] = extractelement <2 x double> [[TMP4]], i32 1
67 ; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt double [[TMP5]], [[TMP6]]
68 ; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN6:%.*]], label [[IF_END7]]
69 ; CHECK: if.then6:
70 ; CHECK-NEXT: br label [[IF_END7]]
71 ; CHECK: if.end7:
72 ; CHECK-NEXT: ret void
73 ;
74 entry:
75 %sub = fneg double undef
76 %0 = load double, double* @d, align 8
77 %sub1 = fneg double %0
78 br i1 icmp eq (%struct.GPar.0.16.26* (...)* inttoptr (i64 115 to %struct.GPar.0.16.26* (...)*), %struct.GPar.0.16.26* (...)* @Rf_gpptr), label %if.then, label %if.end7
5379
80 if.then: ; preds = %entry
81 %sub2 = fsub double %sub, undef
82 %div.i = fdiv double %sub2, undef
83 %sub4 = fsub double %sub1, undef
84 %div.i16 = fdiv double %sub4, undef
85 %cmp = fcmp ogt double %div.i, %div.i16
86 br i1 %cmp, label %if.then6, label %if.end7
87
88 if.then6: ; preds = %if.then
89 br label %if.end7
90
91 if.end7: ; preds = %if.then6, %if.then, %entry
92 %g.0 = phi double [ 0.000000e+00, %if.then6 ], [ %sub, %if.then ], [ %sub, %entry ]
93 ret void
94 }