brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 42c8e3d Raw
38 lines · plain
1; RUN: llc -mtriple=hexagon -mcpu=hexagonv5 < %s | FileCheck %s2; Check that we generate floating point compare in V53 4; CHECK: p{{[0-2]+}} = sfcmp.{{.}}5 6define i32 @foo(float %y) nounwind {7entry:8  %retval = alloca i32, align 49  %y.addr = alloca float, align 410  store float %y, ptr %y.addr, align 411  %0 = load float, ptr %y.addr, align 412  %cmp = fcmp ogt float %0, 0x406AD7EFA000000013  br i1 %cmp, label %if.then, label %if.else14 15if.then:                                          ; preds = %entry16  store i32 1, ptr %retval17  br label %return18 19if.else:                                          ; preds = %entry20  store i32 2, ptr %retval21  br label %return22 23return:                                           ; preds = %if.else, %if.then24  %1 = load i32, ptr %retval25  ret i32 %126}27 28define i32 @main() nounwind {29entry:30  %retval = alloca i32, align 431  %a = alloca float, align 432  store i32 0, ptr %retval33  store float 0x40012E0A00000000, ptr %a, align 434  %0 = load float, ptr %a, align 435  %call = call i32 @foo(float %0)36  ret i32 %call37}38