- Aug 29, 2014
-
-
Benjamin Kramer authored
llvm-svn: 216718
-
Robert Khasanov authored
Added new types to Legalizer. Fixed getSetCCResultType function Added lowering tests. Reviewed by Elena Demikhovsky. llvm-svn: 216717
-
Job Noorman authored
The code in SelectionDAG::getMemset for some reason assumes the value passed to memset is an i32. This breaks the generated code for targets that only have registers smaller than 32 bits because the value might get split into multiple registers by the calling convention. See the test for the MSP430 target included in the patch for an example. This patch ensures that nothing is assumed about the type of the value. Instead, the type is taken from the selected overload of the llvm.memset intrinsic. llvm-svn: 216716
-
David Blaikie authored
llvm-svn: 216715
-
David Majnemer authored
Summary: We did a great job getting this wrong: - We messed up which LLVM IR types to use for arguments and return values. The optimized libcalls use integer types for values. Clang attempted to use the IR type which corresponds to the value passed in instead of using an appropriately sized integer type. This would result in violations of the ABI for, as an example, floating point types. - We didn't bother recording the result of the atomic libcall in the destination memory. Instead, call the functions with arguments matching the type of the libcall prototype's parameters. This fixes PR20780. Differential Revision: http://reviews.llvm.org/D5098 llvm-svn: 216714
-
David Blaikie authored
It hits a limit when we reach ActionList, which is used for dynamic conditional ownership, so we lose type safety there. This did expose at least one caller "lying" about ownership (passing ownership to an Action, then updating the Action to specify that it doesn't actually own the thing that was passed) - changing this to unique_ptr just makes that oddity more obvious. llvm-svn: 216713
-
David Blaikie authored
Rather than having a pair of pairs and a reference out parameter, build a structure with everything together and named. A raw pointer and a unique_ptr, rather than a raw pointer and a boolean, are used to communicate ownership transfer. It's possible one day we'll end up with a conditional pointer (probably represented by a raw pointer and a boolean) abstraction to use in places like this. Conditional ownership seems to be coming up more often than I'd hoped... llvm-svn: 216712
-
Craig Topper authored
llvm-svn: 216711
-
Craig Topper authored
Use llvm::makeArrayRef instead of explicitly calling ArrayRef constructor and mentioning the type. This works now that we have a conversion from ArrayRef<T*> to ArrayRef<const T*>. llvm-svn: 216710
-
Craig Topper authored
Add conversion constructor to convert ArrayRef<T*> to ArrayRef<const T*>. Reviewed with Chandler and David Blaikie. llvm-svn: 216709
-
David Blaikie authored
llvm-svn: 216707
-
Jiangning Liu authored
1) Add some missing bitcast patterns for v8f16. 2) Add type promotion for operand of ld/st operations. llvm-svn: 216706
-
Kostya Serebryany authored
llvm-svn: 216705
-
Chris Bieneman authored
Reviewed by: Chandlerc llvm-svn: 216704
-
Chris Bieneman authored
Code reviewed by Chandlerc llvm-svn: 216703
-
Kostya Serebryany authored
Summary: The current implementation of asan cookie is incorrect: we add nosanitize metadata to the cookie load, but the metadata may be lost and we will instrument the load from poisoned memory. This change replaces the load with a call to __asan_load_cxx_array_cookie (r216692) Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5111 llvm-svn: 216702
-
Alexey Samsonov authored
I've fixed most of the simple bugs and currently "check-llvm" test suite has 26 failures, and "check-clang" suite has 5 failures. llvm-svn: 216701
-
Juergen Ributzka authored
This fix checks first if the instruction to be folded (e.g. sign-/zero-extend, or shift) is in the same machine basic block as the instruction we are folding into. Not doing so can result in incorrect code, because the value might not be live-out of the basic block, where the value is defined. This fixes rdar://problem/18169495. llvm-svn: 216700
-
Hans Wennborg authored
For the following code: __declspec(dllimport) int f(int x); int user(int x) { return f(x); } int f(int x) { return 1; } Clang will drop the dllimport attribute in the AST, but CodeGen would have already put it on the LLVM::Function, and that would never get updated. (The same thing happens for global variables.) This makes Clang check dropped DLL attribute case each time the LLVM object is referenced. This isn't perfect, because we will still get it wrong if the function is never referenced by codegen after the attribute is dropped, but this handles the common cases and makes us not fail in the verifier. llvm-svn: 216699 -
David Majnemer authored
This reverts commit r216523 and r216598; people have reported regressions. llvm-svn: 216698
-
Alexey Samsonov authored
This change is the last in the pack of five commits (also see r216691, r216694, r216695, and r216696) that reduces the number of test failures in "check-clang" invocation in UBSan bootstrap from 2443 down to 5. llvm-svn: 216697
-
Alexey Samsonov authored
This bug was reported by UBSan. llvm-svn: 216696
-
Alexey Samsonov authored
This bug was reported by UBSan. llvm-svn: 216695
-
Alexey Samsonov authored
This bug was reported by UBSan. llvm-svn: 216694
-
Reid Kleckner authored
Don't promote byval pointer arguments when when their size in bits is not equal to their alloc size in bits. This can happen for x86_fp80, where the size in bits is 80 but the alloca size in bits in 128. Promoting these types can break passing unions of x86_fp80s and other types. Patch by Thomas Jablin! Reviewed By: rnk Differential Revision: http://reviews.llvm.org/D5057 llvm-svn: 216693
-
Kostya Serebryany authored
[asan] introduce __asan_load_cxx_array_cookie: check that the array cookie address is properly poisoned and return the cookie value. If not, return 0 to avoid infinite loop of DTORs (in case of use-after-free). Calls to this function will be inserted by clang (separate change) llvm-svn: 216692
-
Alexey Samsonov authored
This bug was reported by UBSan. llvm-svn: 216691
-
Todd Fiala authored
This setting is not yet hooked up to anything. In preparation for adding/testing llgs for local Linux debugging. llvm-svn: 216690
-
Jim Grosbach authored
The AArch64 target lowering for [zs]ext of vectors is set up to handle input simple types and expects the generic SDag path to do something reasonable with anything that's not a simple type. The code, however, was only checking that the result type was a simple type and assuming that implied that the source type would also be a simple type. That's not a valid assumption, as operations like "zext <1 x i1> %0 to <1 x i32>" demonstrate. The fix is to simply explicitly validate the source type as well as the result type. PR20791 llvm-svn: 216689
-
Sanjay Patel authored
llvm-svn: 216688
-
Rafael Espindola authored
With this patch we call external tools for powerpc-darwin with "-arch ppc" instead of "-arch powerpc", so as to be compatible with the cctools assembler and ld64 linker. Patch by Stephen Drake! llvm-svn: 216687
-
Todd Fiala authored
For hosts that cannot support long thread names, shrink the host wait4 thread name so that it does not truncate the PID in the thread name. Change by Shawn Best. llvm-svn: 216686
-
Richard Smith authored
llvm-svn: 216685
-
Kostya Serebryany authored
[asan] disable poison_array_cookie while I am investigating a false positive on chromium (I suspect that LLVM looses nosanitizer metadata; no test yet) llvm-svn: 216684
-
Richard Smith authored
llvm-svn: 216683
-
Rafael Espindola authored
On MachO, putting a symbol that doesn't start with a 'L' or 'l' in one of the __TEXT,__literal* sections prevents the linker from merging the context of the section. Since private GVs are the ones the get mangled to start with 'L' or 'l', we now only put those on the __TEXT,__literal* sections. llvm-svn: 216682
-
Frederic Riss authored
llvm-svn: 216681
-
Rui Ueyama authored
When a relocation is applied to a location, the new value needs to be added to the existing value at the location. Existing value is in most cases zero, but if not, the current code does not work. llvm-svn: 216680
-
Sanjay Patel authored
Remove a block of code from LowerSIGN_EXTEND_INREG() that was added with: http://llvm.org/viewvc/llvm-project?view=revision&revision=177421 And caused: http://llvm.org/bugs/show_bug.cgi?id=20472 (more analysis here) http://llvm.org/bugs/show_bug.cgi?id=18054 The testcases confirm that we (1) don't remove a zext op that is necessary and (2) generate a pmovz instead of punpck if SSE4.1 is available. Although pmovz is 1 byte longer, it allows folding of the load, and so saves 3 bytes overall. Differential Revision: http://reviews.llvm.org/D4909 llvm-svn: 216679
-
Owen Anderson authored
was marked custom. The target independent DAG combine has no way to know if the shuffles it is introducing are ones that the target could support or not. llvm-svn: 216678
-