blob: 4ca2f1871c0f5841a4ed489c7e40c4f6d1f132b7 [file] [log] [blame]
Dan Gohman36a09472009-09-08 23:54:48 +00001; RUN: llc < %s -march=x86 | not grep set
Evan Chenga80ea032006-01-30 23:39:40 +00002
Tanya Lattner33eefff2008-02-21 07:42:26 +00003declare i1 @llvm.isunordered.f32(float, float)
Evan Chenga80ea032006-01-30 23:39:40 +00004
Dale Johannesen1d3863f2008-03-31 23:20:09 +00005define float @cmp(float %A, float %B, float %C, float %D) nounwind {
Evan Chenga80ea032006-01-30 23:39:40 +00006entry:
Tanya Lattner33eefff2008-02-21 07:42:26 +00007 %tmp.1 = fcmp uno float %A, %B ; <i1> [#uses=1]
8 %tmp.2 = fcmp oge float %A, %B ; <i1> [#uses=1]
9 %tmp.3 = or i1 %tmp.1, %tmp.2 ; <i1> [#uses=1]
10 %tmp.4 = select i1 %tmp.3, float %C, float %D ; <float> [#uses=1]
11 ret float %tmp.4
Evan Chenga80ea032006-01-30 23:39:40 +000012}
Tanya Lattner33eefff2008-02-21 07:42:26 +000013