llvm-6502/lib
Juergen Ributzka d10a9fb25a [DAG] During DAG legalization keep opaque constants even after expanding.
The included test case would return the incorrect results, because the expansion
of an shift with a constant shift amount of 0 would generate undefined behavior.

This is because ExpandShiftByConstant assumes that all shifts by constants with
a value of 0 have already been optimized away. This doesn't happen for opaque
constants and usually this isn't a problem, because opaque constants won't take
this code path - they are not supposed to. In the case that the opaque constant
has to be expanded by the legalizer, the legalizer would drop the opaque flag.
In this case we hit the limitations of ExpandShiftByConstant and create incorrect
code.

This commit fixes the legalizer by not dropping the opaque flag when expanding
opaque constants and adding an assertion to ExpandShiftByConstant to catch this
not supported case in the future.

This fixes <rdar://problem/16718472>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207304 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-26 02:58:04 +00:00
..
Analysis [LCG] Refactor the duplicated code I added in my last commit here into 2014-04-26 01:03:46 +00:00
AsmParser Add 'musttail' marker to call instructions 2014-04-24 20:14:34 +00:00
Bitcode Add 'musttail' marker to call instructions 2014-04-24 20:14:34 +00:00
CodeGen [DAG] During DAG legalization keep opaque constants even after expanding. 2014-04-26 02:58:04 +00:00
DebugInfo Fix missing include 2014-04-25 21:42:35 +00:00
ExecutionEngine [C++] Use 'nullptr'. 2014-04-24 06:44:33 +00:00
IR Add missing include guards and missing #include, found by modules build. 2014-04-26 00:53:26 +00:00
IRReader [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 06:32:26 +00:00
LineEditor [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
Linker [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 06:32:26 +00:00
LTO Add an -mattr option to the gold plugin to support subtarget features in LTO 2014-04-25 21:46:51 +00:00
MC Fix quadratic performance during debug compression due to sections x symbols iteration. 2014-04-25 00:48:01 +00:00
Object [yaml2obj][ELF] Remove unnecessary space between namespace name and 2014-04-23 17:30:29 +00:00
Option Protect the ArgList dtor 2014-04-20 23:59:00 +00:00
ProfileData ProfileData: Treat missing function counts as malformed 2014-04-25 02:45:33 +00:00
Support cl::ParseCommandLineOptions(): Use StringRef to receive sys::path::filename() instead of std::string. 2014-04-23 14:51:23 +00:00
TableGen [C++11] Make use of 'nullptr' in TableGen library. 2014-04-09 04:50:04 +00:00
Target [X86] Implement TargetLowering::getScalingFactorCost hook. 2014-04-26 01:11:26 +00:00
Transforms Revert commit r207302 since build failures 2014-04-26 02:03:17 +00:00
CMakeLists.txt ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00
LLVMBuild.txt ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00
Makefile ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00