File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
llvm/test/Transforms/InstCombine Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -730,6 +730,19 @@ define float @fnabs(float %a) {
730
730
ret float %fneg1
731
731
}
732
732
733
+ define float @fnabs_1 (float %a ) {
734
+ ; CHECK-LABEL: @fnabs_1(
735
+ ; CHECK-NEXT: [[TMP1:%.*]] = call nsz float @llvm.fabs.f32(float [[A:%.*]])
736
+ ; CHECK-NEXT: [[FNEG1:%.*]] = fneg float [[TMP1]]
737
+ ; CHECK-NEXT: ret float [[FNEG1]]
738
+ ;
739
+ %fneg = fneg float %a
740
+ %cmp = fcmp olt float %a , %fneg
741
+ %sel = select nsz i1 %cmp , float %fneg , float %a
742
+ %fneg1 = fneg float %sel
743
+ ret float %fneg1
744
+ }
745
+
733
746
define float @select_fneg_both (float %x , float %y , i1 %b ) {
734
747
; CHECK-LABEL: @select_fneg_both(
735
748
; CHECK-NEXT: [[S_V:%.*]] = select i1 [[B:%.*]], float [[X:%.*]], float [[Y:%.*]]
You can’t perform that action at this time.
0 commit comments