98 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -passes=slp-vectorizer,dce -S -mtriple=x86_64-apple-macosx10.8.0 -mcpu=corei7 | FileCheck %s3 4target 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"5target triple = "x86_64-apple-macosx10.8.0"6 7%struct.GPar.0.16.26 = type { [0 x double], double }8 9@d = external global double, align 810 11declare ptr @Rf_gpptr(...)12 13define void @Rf_GReset() {14; CHECK-LABEL: @Rf_GReset(15; CHECK-NEXT: entry:16; CHECK-NEXT: [[TMP0:%.*]] = load double, ptr @d, align 817; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x double> <double poison, double undef>, double [[TMP0]], i32 018; CHECK-NEXT: [[TMP2:%.*]] = fsub <2 x double> splat (double -0.000000e+00), [[TMP1]]19; CHECK-NEXT: [[CMP2:%.*]] = icmp eq ptr inttoptr (i64 115 to ptr), @Rf_gpptr20; CHECK-NEXT: br i1 [[CMP2]], label [[IF_THEN:%.*]], label [[IF_END7:%.*]]21; CHECK: if.then:22; CHECK-NEXT: [[TMP3:%.*]] = fsub <2 x double> [[TMP2]], undef23; CHECK-NEXT: [[TMP4:%.*]] = fdiv <2 x double> [[TMP3]], undef24; CHECK-NEXT: [[TMP5:%.*]] = extractelement <2 x double> [[TMP4]], i32 025; CHECK-NEXT: [[TMP6:%.*]] = extractelement <2 x double> [[TMP4]], i32 126; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt double [[TMP6]], [[TMP5]]27; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN6:%.*]], label [[IF_END7]]28; CHECK: if.then6:29; CHECK-NEXT: br label [[IF_END7]]30; CHECK: if.end7:31; CHECK-NEXT: ret void32;33entry:34 %sub = fsub double -0.000000e+00, undef35 %0 = load double, ptr @d, align 836 %sub1 = fsub double -0.000000e+00, %037 %cmp2 = icmp eq ptr inttoptr (i64 115 to ptr), @Rf_gpptr38 br i1 %cmp2, label %if.then, label %if.end739 40if.then: ; preds = %entry41 %sub2 = fsub double %sub, undef42 %div.i = fdiv double %sub2, undef43 %sub4 = fsub double %sub1, undef44 %div.i16 = fdiv double %sub4, undef45 %cmp = fcmp ogt double %div.i, %div.i1646 br i1 %cmp, label %if.then6, label %if.end747 48if.then6: ; preds = %if.then49 br label %if.end750 51if.end7: ; preds = %if.then6, %if.then, %entry52 %g.0 = phi double [ 0.000000e+00, %if.then6 ], [ %sub, %if.then ], [ %sub, %entry ]53 ret void54}55 56define void @Rf_GReset_unary_fneg() {57; CHECK-LABEL: @Rf_GReset_unary_fneg(58; CHECK-NEXT: entry:59; CHECK-NEXT: [[TMP0:%.*]] = load double, ptr @d, align 860; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x double> <double poison, double undef>, double [[TMP0]], i32 061; CHECK-NEXT: [[TMP2:%.*]] = fneg <2 x double> [[TMP1]]62; CHECK-NEXT: [[CMP2:%.*]] = icmp eq ptr inttoptr (i64 115 to ptr), @Rf_gpptr63; CHECK-NEXT: br i1 [[CMP2]], label [[IF_THEN:%.*]], label [[IF_END7:%.*]]64; CHECK: if.then:65; CHECK-NEXT: [[TMP3:%.*]] = fsub <2 x double> [[TMP2]], undef66; CHECK-NEXT: [[TMP4:%.*]] = fdiv <2 x double> [[TMP3]], undef67; CHECK-NEXT: [[TMP5:%.*]] = extractelement <2 x double> [[TMP4]], i32 068; CHECK-NEXT: [[TMP6:%.*]] = extractelement <2 x double> [[TMP4]], i32 169; CHECK-NEXT: [[CMP:%.*]] = fcmp ogt double [[TMP6]], [[TMP5]]70; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN6:%.*]], label [[IF_END7]]71; CHECK: if.then6:72; CHECK-NEXT: br label [[IF_END7]]73; CHECK: if.end7:74; CHECK-NEXT: ret void75;76entry:77 %sub = fneg double undef78 %0 = load double, ptr @d, align 879 %sub1 = fneg double %080 %cmp2 = icmp eq ptr inttoptr (i64 115 to ptr), @Rf_gpptr81 br i1 %cmp2, label %if.then, label %if.end782 83if.then: ; preds = %entry84 %sub2 = fsub double %sub, undef85 %div.i = fdiv double %sub2, undef86 %sub4 = fsub double %sub1, undef87 %div.i16 = fdiv double %sub4, undef88 %cmp = fcmp ogt double %div.i, %div.i1689 br i1 %cmp, label %if.then6, label %if.end790 91if.then6: ; preds = %if.then92 br label %if.end793 94if.end7: ; preds = %if.then6, %if.then, %entry95 %g.0 = phi double [ 0.000000e+00, %if.then6 ], [ %sub, %if.then ], [ %sub, %entry ]96 ret void97}98