File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
llvm/test/CodeGen/AArch64 Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -53,3 +53,22 @@ define i64 @test_integer(i64 %in) {
5353 %val = select i1 %cmp , i64 0 , i64 %in
5454 ret i64 %val
5555}
56+
57+ ; Make sure we don't translate it into fminnm when the nsz flag is set on the fcmp.
58+ define float @minnum_fcmp_nsz (float %x , float %y ) {
59+ ; CHECK-LABEL: minnum_fcmp_nsz:
60+ %cmp = fcmp nnan nsz ole float %x , %y
61+ %sel = select i1 %cmp , float %x , float %y
62+ ret float %sel
63+ ; CHECK-NOT: fminnm
64+ ; CHECK: fcsel s0, s0, s1, le
65+ }
66+
67+ ; Make sure we translate it into fminnm when the nsz flag is set on the select.
68+ define float @minnum_select_nsz (float %x , float %y ) {
69+ ; CHECK-LABEL: minnum_select_nsz:
70+ %cmp = fcmp nnan ole float %x , %y
71+ %sel = select nsz i1 %cmp , float %x , float %y
72+ ret float %sel
73+ ; CHECK: fminnm s0, s0, s1
74+ }
You can’t perform that action at this time.
0 commit comments