Jim Grosbach
cbf676b3ba
float comparison to double 'zero' constant can just be a float 'zero.'
InstCombine was incorrectly considering the conversion of the constant
zero to be unsafe.
We want to transform:
define float @bar(float %x) nounwind readnone optsize ssp {
%conv = fpext float %x to double
%cmp = fcmp olt double %conv, 0.000000e+00
%conv1 = zext i1 %cmp to i32
%conv2 = sitofp i32 %conv1 to float
ret float %conv2
}
Into:
define float @bar(float %x) nounwind readnone optsize ssp {
%cmp = fcmp olt float %x, 0.000000e+00 ; <---- This
%conv1 = zext i1 %cmp to i32
%conv2 = sitofp i32 %conv1 to float
ret float %conv2
}
rdar://10215914
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140869 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-30 18:45:50 +00:00
..
2011-09-02 22:41:11 +00:00
2011-01-16 08:09:24 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2011-09-20 22:29:43 +00:00
2011-03-11 21:52:04 +00:00
2011-07-27 19:47:34 +00:00
2011-07-09 17:41:24 +00:00
2011-01-16 21:57:20 +00:00
2011-09-01 00:58:03 +00:00
2011-09-06 18:14:09 +00:00
2011-08-12 22:50:01 +00:00
2011-09-01 00:58:03 +00:00
2009-09-11 18:01:28 +00:00
2011-08-12 22:50:01 +00:00
2011-09-09 07:50:37 +00:00
2011-09-28 02:13:32 +00:00
2011-09-19 22:11:35 +00:00
2011-09-30 18:45:50 +00:00
2011-09-05 18:16:19 +00:00
2011-03-07 21:28:14 +00:00
2011-09-01 00:58:03 +00:00
2011-08-12 22:50:01 +00:00
2011-09-02 22:41:11 +00:00
2011-08-15 20:52:09 +00:00
2011-08-30 23:03:45 +00:00
2011-09-27 20:39:19 +00:00
2011-06-17 06:57:15 +00:00
2011-09-19 23:50:34 +00:00
2011-09-27 20:39:19 +00:00
2011-09-15 20:58:37 +00:00
2011-09-27 00:59:31 +00:00
2011-09-26 20:27:49 +00:00
2011-07-06 18:22:43 +00:00
2009-09-11 18:01:28 +00:00
2009-09-11 18:01:28 +00:00
2011-08-31 21:39:05 +00:00
2011-08-17 22:22:24 +00:00
2011-02-09 06:32:02 +00:00
2011-09-29 22:27:34 +00:00
2011-08-19 21:21:20 +00:00
2011-08-31 21:04:11 +00:00
2011-08-02 02:47:45 +00:00
2011-09-27 20:39:19 +00:00
2011-09-20 23:28:51 +00:00
2011-09-19 22:11:35 +00:00
2011-09-27 20:39:19 +00:00
2011-09-01 21:25:42 +00:00
2011-08-03 06:15:41 +00:00
2011-09-19 22:16:15 +00:00
2011-08-30 23:03:45 +00:00