llvm-6502/lib/Transforms/InstCombine
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
..
CMakeLists.txt Rewrite the CMake build to use explicit dependencies between libraries, 2011-07-29 00:14:25 +00:00
InstCombine.h Inlining often produces landingpad instructions with repeated 2011-09-30 13:12:16 +00:00
InstCombineAddSub.cpp land David Blaikie's patch to de-constify Type, with a few tweaks. 2011-07-18 04:54:35 +00:00
InstCombineAndOrXor.cpp Stop emitting instructions with the name "tmp" they eat up memory and have to be uniqued, without any benefit. 2011-09-27 20:39:19 +00:00
InstCombineCalls.cpp Stop emitting instructions with the name "tmp" they eat up memory and have to be uniqued, without any benefit. 2011-09-27 20:39:19 +00:00
InstCombineCasts.cpp Stop emitting instructions with the name "tmp" they eat up memory and have to be uniqued, without any benefit. 2011-09-27 20:39:19 +00:00
InstCombineCompares.cpp float comparison to double 'zero' constant can just be a float 'zero.' 2011-09-30 18:45:50 +00:00
InstCombineLoadStoreAlloca.cpp Use the getFirstInsertionPt() method instead of getFirstNonPHI + an 'isa<>' 2011-08-16 20:45:24 +00:00
InstCombineMulDivRem.cpp Stop emitting instructions with the name "tmp" they eat up memory and have to be uniqued, without any benefit. 2011-09-27 20:39:19 +00:00
InstCombinePHI.cpp Update instcombine for atomic load/store. 2011-08-15 22:09:40 +00:00
InstCombineSelect.cpp Clean up includes of llvm/Analysis/ConstantFolding.h so it's included where it's used and not included where it isn't. 2011-07-20 21:57:23 +00:00
InstCombineShifts.cpp Make sure to correctly clear the exact/nuw/nsw flags off of shifts when they are combined together. <rdar://problem/9859829> 2011-07-29 00:18:19 +00:00
InstCombineSimplifyDemanded.cpp Stop emitting instructions with the name "tmp" they eat up memory and have to be uniqued, without any benefit. 2011-09-27 20:39:19 +00:00
InstCombineVectorOps.cpp land David Blaikie's patch to de-constify Type, with a few tweaks. 2011-07-18 04:54:35 +00:00
InstCombineWorklist.h InstCombine: We know the number of items initially added to the worklist map, reserve space early to avoid rehashing. 2011-03-05 16:43:46 +00:00
InstructionCombining.cpp Inlining often produces landingpad instructions with repeated 2011-09-30 13:12:16 +00:00
Makefile make -fno-rtti the default unless a directory builds with REQUIRES_RTTI. 2010-01-24 20:43:08 +00:00