summaryrefslogtreecommitdiff
path: root/unittests/IR/InstructionsTest.cpp
Commit message (Collapse)AuthorAge
* Bug 18228 - Fix accepting bitcasts between vectors of pointers with aMatt Arsenault2014-01-22
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199821 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a: and s: instead of a0: and s0: in the DataLayout strings.Rafael Espindola2013-12-13
| | | | | | They are equivalent and the size of 'a' and 's' is unused. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197259 91177308-0d34-0410-b5e6-96231b3b80d8
* Add addrspacecast instruction.Matt Arsenault2013-11-15
| | | | | | Patch by Michele Scandale! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194760 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix ptr vector inconsistency in CreatePointerCastMatt Arsenault2013-07-31
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187464 91177308-0d34-0410-b5e6-96231b3b80d8
* Respect address space sizes in isEliminableCastPair.Matt Arsenault2013-07-30
| | | | | | | This avoids constant folding bitcast/ptrtoint/inttoptr combinations that have illegal bitcasts between differently sized address spaces. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187455 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Remove isCastable since nothing uses it now"Matt Arsenault2013-07-30
| | | | | | Apparently dragonegg uses it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187454 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove isCastable since nothing uses it nowMatt Arsenault2013-07-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187448 91177308-0d34-0410-b5e6-96231b3b80d8
* Change behavior of calling bitcasted alias functions.Matt Arsenault2013-07-30
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187444 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix copypaste error in test.Matt Arsenault2013-06-28
| | | | | | Thename says it's an i32*, but it was actually creating another i8* git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185239 91177308-0d34-0410-b5e6-96231b3b80d8
* Change GetPointerBaseWithConstantOffset's DataLayout argument from aDan Gohman2013-01-31
| | | | | | | | reference to a pointer, so that it can handle the case where DataLayout is not available and behave conservatively. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174024 91177308-0d34-0410-b5e6-96231b3b80d8
* A test for r172535.Evgeniy Stepanov2013-01-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172614 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename the VMCore unittest tree to IR. Somehow was missed when doing theChandler Carruth2013-01-07
library rename. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171747 91177308-0d34-0410-b5e6-96231b3b80d8