llvm-project/llvm/lib
Sanjay Patel e730ce87a5 [InstCombine] fix bug when offsetting case values of a switch (PR31260)
We could truncate the condition and then try to fold the add into the
original condition value causing wrong case constants to be used.

Move the offset transform ahead of the truncate transform and return
after each transform, so there's no chance of getting confused values.

Fix for:
https://llvm.org/bugs/show_bug.cgi?id=31260

llvm-svn: 289442
2016-12-12 16:13:52 +00:00
..
Analysis [SCEVExpand] do not hoist divisions by zero (PR30935) 2016-12-12 02:52:51 +00:00
AsmParser [AsmParser] Avoid recursing when lexing ';'. NFC. 2016-11-16 22:25:05 +00:00
Bitcode Fix MSVC bool to uint64_t promotion warning 2016-12-06 11:12:53 +00:00
CodeGen [SelectionDAG] Add support for EXTRACT_SUBVECTOR to ComputeNumSignBits 2016-12-12 10:29:43 +00:00
DebugInfo Make a DWARF generator so we can unit test DWARF APIs with gtest. 2016-12-08 01:03:48 +00:00
Demangle Demangle: remove references to allocator for default allocator 2016-11-20 00:20:27 +00:00
ExecutionEngine [mips][rtdyld] Merge code to write relocated values to the section. NFC 2016-12-07 11:41:23 +00:00
Fuzzer [libFuzzer] don't depend on time in a test 2016-12-11 06:28:09 +00:00
IR [Verifier] Add verification for TBAA metadata 2016-12-11 20:07:15 +00:00
IRReader Timer: Track name and description. 2016-11-18 19:43:18 +00:00
LTO [ThinLTO] Import only necessary DICompileUnit fields 2016-12-12 16:09:30 +00:00
LibDriver Object: Replace NewArchiveIterator with a simpler NewArchiveMember class. NFCI. 2016-06-29 22:27:42 +00:00
LineEditor
Linker [ThinLTO] Import only necessary DICompileUnit fields 2016-12-12 16:09:30 +00:00
MC Add a comment consumer mechanism to MCAsmLexer 2016-12-08 10:31:21 +00:00
Object [Object][MachO] Reference-ify some helper function arguments. NFC. 2016-12-04 01:56:10 +00:00
ObjectYAML [ObjectYAML] Support for DWARF debug_aranges 2016-12-09 00:26:44 +00:00
Option Generalize ArgList::AddAllArgs more 2016-09-29 19:47:58 +00:00
Passes [PM] Support invalidation of inner analysis managers from a pass over the outer IR unit. 2016-12-10 06:34:44 +00:00
ProfileData Make the Error class constructor protected 2016-11-11 04:28:40 +00:00
Support Tweak the core loop in StringRef::find to avoid calling memcmp on every 2016-12-11 07:46:21 +00:00
TableGen [TableGen] Centralize/Unify error handling. 2016-12-05 22:58:01 +00:00
Target Update inline argument comment. NFCI. 2016-12-12 13:43:15 +00:00
Transforms [InstCombine] fix bug when offsetting case values of a switch (PR31260) 2016-12-12 16:13:52 +00:00
CMakeLists.txt Try to fix a circular dependency in the modules build. 2016-09-06 20:16:19 +00:00
LLVMBuild.txt Add an c++ itanium demangler to llvm. 2016-09-06 19:16:48 +00:00