Go to file
Manman Ren edc60376ed SimplifyCFG: fix a bug in switch to table conversion
We use gep to access the global array "switch.table", and the table index
should be treated as unsigned. When the highest bit is 1, this commit
zero-extends the index to an integer type with larger size.

For a switch on i2, we used to generate:
%switch.tableidx = sub i2 %0, -2
getelementptr inbounds [4 x i64]* @switch.table, i32 0, i2 %switch.tableidx

It is incorrect when %switch.tableidx is 2 or 3. The fix is to generate
%switch.tableidx = sub i2 %0, -2
%switch.tableidx.zext = zext i2 %switch.tableidx to i3
getelementptr inbounds [4 x i64]* @switch.table, i32 0, i3 %switch.tableidx.zext

rdar://17735071

llvm-svn: 213815
2014-07-23 23:13:23 +00:00
clang PR20228: don't retain a pointer to a vector element after the container has been resized. 2014-07-23 20:07:08 +00:00
clang-tools-extra Add the fix that should've accompanied r213738. 2014-07-23 11:50:54 +00:00
compiler-rt Build libcxx-tsan only if TSan is supported on host architecture 2014-07-23 20:07:26 +00:00
debuginfo-tests relax testcase for LLDB output format compatibility. 2014-03-19 23:06:18 +00:00
libclc Implement sin builtin for float types 2014-07-23 15:16:21 +00:00
libcxx Fix ctype_base::xdigit for Android. 2014-07-23 19:32:03 +00:00
libcxxabi libcxxabi cmake: Use HandleLLVMOptions.cmake, don't manually add -std=c++11. 2014-07-16 23:53:37 +00:00
lld [PECOFF] Add the entry point file at the right place. 2014-07-23 21:41:20 +00:00
lldb Ensure that if some unspecified person were to pass in an invalid architecture when trying to create a target, that it would fail, but not cause LLDB to crash. 2014-07-23 18:18:38 +00:00
llvm SimplifyCFG: fix a bug in switch to table conversion 2014-07-23 23:13:23 +00:00
openmp CMake: remove duplicated source file from list 2014-06-02 13:09:24 +00:00
polly [Fix] Typo during refactoring 2014-07-23 20:26:25 +00:00