llvm-6502/lib/Transforms/InstCombine
Andrea Di Biagio d25126faae [InstCombine] Fix regression introduced at r227197.
This patch fixes a problem I accidentally introduced in an instruction combine
on select instructions added at r227197. That revision taught the instruction
combiner how to fold a cttz/ctlz followed by a icmp plus select into a single
cttz/ctlz with flag 'is_zero_undef' cleared.

However, the new rule added at r227197 would have produced wrong results in the
case where a cttz/ctlz with flag 'is_zero_undef' cleared was follwed by a
zero-extend or truncate. In that case, the folded instruction would have
been inserted in a wrong location thus leaving the CFG in an inconsistent
state.

This patch fixes the problem and add two reproducible test cases to
existing test 'InstCombine/select-cmp-cttz-ctlz.ll'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229124 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 16:33:34 +00:00
..
CMakeLists.txt Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
InstCombineAddSub.cpp
InstCombineAndOrXor.cpp InstCombine: Allow folding of xor into icmp by changing the predicate for vectors 2015-02-12 20:26:46 +00:00
InstCombineCalls.cpp Revert r228556: InstCombine: propagate nonNull through assume 2015-02-10 08:07:32 +00:00
InstCombineCasts.cpp
InstCombineCompares.cpp [InstCombine] Fix a bug when combining icmp from ptrtoint 2015-02-13 04:51:26 +00:00
InstCombineInternal.h
InstCombineLoadStoreAlloca.cpp [IC] Fix a bug with the instcombine canonicalizing of loads and 2015-02-13 02:30:01 +00:00
InstCombineMulDivRem.cpp
InstCombinePHI.cpp
InstCombineSelect.cpp [InstCombine] Fix regression introduced at r227197. 2015-02-13 16:33:34 +00:00
InstCombineShifts.cpp
InstCombineSimplifyDemanded.cpp
InstCombineVectorOps.cpp
InstructionCombining.cpp Don't promote asynch EH invokes of nounwind functions to calls 2015-02-11 01:23:16 +00:00
LLVMBuild.txt
Makefile