• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt %s -codegenprepare -mattr=+soft-float -S | FileCheck %s -check-prefix=CHECK -check-prefix=SOFTFP
2; RUN: opt %s -codegenprepare -mattr=-soft-float -S | FileCheck %s -check-prefix=CHECK -check-prefix=HARDFP
3
4target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5target triple = "x86_64-unknown-linux-gnu"
6
7; CHECK-LABEL: @foo
8; CHECK:       entry:
9; SOFTFP:      fcmp
10; HARDFP-NOT:  fcmp
11; CHECK:       body:
12; SOFTFP-NOT:  fcmp
13; HARDFP:      fcmp
14define void @foo(float %a, float %b) {
15entry:
16  %c = fcmp oeq float %a, %b
17  br label %head
18head:
19  %IND = phi i32 [ 0, %entry ], [ %IND.new, %body1 ]
20  %CMP = icmp slt i32 %IND, 1250
21  br i1 %CMP, label %body, label %tail
22body:
23  br i1 %c, label %body1, label %tail
24body1:
25  %IND.new = add i32 %IND, 1
26  br label %head
27tail:
28  ret void
29}
30