1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
Commit Graph

15 Commits

Author SHA1 Message Date
Eli Bendersky
8cb792af00 Fix bot breakage in InstructionsTest.
Makes sure the Call dies before the Function

llvm-svn: 204856
2014-03-26 21:11:34 +00:00
Eli Bendersky
650025164e Fix problem with r204836
In CallInst, op_end() points at the callee, which we don't want to iterate over
when just iterating over arguments. Now take this into account when returning
a iterator_range from arg_operands. Similar reasoning for InvokeInst.

Also adds a unit test to verify this actually works as expected.

llvm-svn: 204851
2014-03-26 20:41:15 +00:00
Benjamin Kramer
e4eb1b495f [C++11] Replace llvm::next and llvm::prior with std::next and std::prev.
Remove the old functions.

llvm-svn: 202636
2014-03-02 12:27:27 +00:00
Matt Arsenault
bd62448a58 Bug 18228 - Fix accepting bitcasts between vectors of pointers with a
different number of elements.

Bitcasts were passing with vectors of pointers with different number of
elements since the number of elements was checking
SrcTy->getVectorNumElements() == SrcTy->getVectorNumElements() which
isn't helpful. The addrspacecast was also wrong, but that case at least
is caught by the verifier. Refactor bitcast and addrspacecast handling
in castIsValid to be more readable and fix this problem.

llvm-svn: 199821
2014-01-22 19:21:33 +00:00
Rafael Espindola
13b264ae64 Use a: and s: instead of a0: and s0: in the DataLayout strings.
They are equivalent and the size of 'a' and 's' is unused.

llvm-svn: 197259
2013-12-13 18:56:34 +00:00
Matt Arsenault
9921608896 Add addrspacecast instruction.
Patch by Michele Scandale!

llvm-svn: 194760
2013-11-15 01:34:59 +00:00
Matt Arsenault
c8e1c3d111 Fix ptr vector inconsistency in CreatePointerCast
One form would accept a vector of pointers, and the other did not.
Make both accept vectors of pointers, and add an assertion
for the number of elements.

llvm-svn: 187464
2013-07-31 00:17:33 +00:00
Matt Arsenault
07681f54ed Respect address space sizes in isEliminableCastPair.
This avoids constant folding bitcast/ptrtoint/inttoptr combinations
that have illegal bitcasts between differently sized address spaces.

llvm-svn: 187455
2013-07-30 22:27:10 +00:00
Matt Arsenault
f58e03599f Revert "Remove isCastable since nothing uses it now"
Apparently dragonegg uses it.

llvm-svn: 187454
2013-07-30 22:02:14 +00:00
Matt Arsenault
2121a49954 Remove isCastable since nothing uses it now
llvm-svn: 187448
2013-07-30 21:11:17 +00:00
Matt Arsenault
c825ddd4ca Change behavior of calling bitcasted alias functions.
It will now only convert the arguments / return value and call
the underlying function if the types are able to be bitcasted.
This avoids using fp<->int conversions that would occur before.

llvm-svn: 187444
2013-07-30 20:45:05 +00:00
Matt Arsenault
5b3f0a05c2 Fix copypaste error in test.
Thename says it's an i32*, but it was actually creating another i8*

llvm-svn: 185239
2013-06-28 23:24:10 +00:00
Dan Gohman
7eac0c2694 Change GetPointerBaseWithConstantOffset's DataLayout argument from a
reference to a pointer, so that it can handle the case where DataLayout
is not available and behave conservatively.

llvm-svn: 174024
2013-01-31 02:00:45 +00:00
Evgeniy Stepanov
c6431b5743 A test for r172535.
llvm-svn: 172614
2013-01-16 14:38:50 +00:00
Chandler Carruth
bcfdf656b1 Rename the VMCore unittest tree to IR. Somehow was missed when doing the
library rename.

llvm-svn: 171747
2013-01-07 15:35:46 +00:00