1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
llvm-mirror/lib/Transforms/InstCombine
Andrea Di Biagio e88e150aaa [InstCombine] Teach SimplifyDemandedVectorElts how to handle ConstantVector select masks with ConstantExpr elements (PR24922)
If the mask of a select instruction is a ConstantVector, method
SimplifyDemandedVectorElts iterates over the mask elements to identify which
values are selected from the select inputs.

Before this patch, method SimplifyDemandedVectorElts always used method
Constant::isNullValue() to check if a value in the mask was zero. Unfortunately
that method always returns false when called on a ConstantExpr.

This patch fixes the problem in SimplifyDemandedVectorElts by adding an explicit
check for ConstantExpr values. Now, if a value in the mask is a ConstantExpr, we
avoid calling isNullValue() on it.

Fixes PR24922.

Differential Revision: http://reviews.llvm.org/D13219

llvm-svn: 249390
2015-10-06 10:34:53 +00:00
..
CMakeLists.txt Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
InstCombineAddSub.cpp don't repeat function names in comments; NFC 2015-09-09 15:24:36 +00:00
InstCombineAndOrXor.cpp [InstCombine] match De Morgan's Law hidden by zext ops (PR22723) 2015-09-25 23:21:38 +00:00
InstCombineCalls.cpp [InstCombine] Remove trivially empty lifetime start/end ranges. 2015-10-01 14:54:31 +00:00
InstCombineCasts.cpp There is a trunc(lshr (zext A), Cst) optimization in InstCombineCasts that 2015-09-10 11:31:20 +00:00
InstCombineCompares.cpp [InstCombine] FoldICmpCstShrCst failed for ashr when comparing against -1 2015-09-19 00:48:31 +00:00
InstCombineInternal.h [InstCombine] fold zexts and constants into a phi (PR24766) 2015-09-27 20:34:31 +00:00
InstCombineLoadStoreAlloca.cpp inariant.group handling in GVN 2015-10-02 22:12:22 +00:00
InstCombineMulDivRem.cpp don't repeat function names in comments; NFC 2015-09-09 15:24:36 +00:00
InstCombinePHI.cpp [InstCombine] fold zexts and constants into a phi (PR24766) 2015-09-27 20:34:31 +00:00
InstCombineSelect.cpp don't repeat function names in comments; NFC 2015-09-09 15:24:36 +00:00
InstCombineShifts.cpp Convert PHI getIncomingValue() to foreach over incoming_values(). NFC. 2015-05-12 20:05:31 +00:00
InstCombineSimplifyDemanded.cpp [InstCombine] Teach SimplifyDemandedVectorElts how to handle ConstantVector select masks with ConstantExpr elements (PR24922) 2015-10-06 10:34:53 +00:00
InstCombineVectorOps.cpp don't repeat function names in comments; NFC 2015-09-09 15:24:36 +00:00
InstructionCombining.cpp add ShouldChangeType() variant that takes bitwidths 2015-09-21 16:09:37 +00:00
LLVMBuild.txt Update libdeps since TLI was moved from Target to Analysis in r226078. 2015-01-15 05:21:00 +00:00
Makefile