IR: SrcTy == DstTy doesn't imply that a cast is valid
authorDavid Majnemer <david.majnemer@gmail.com>
Mon, 16 Feb 2015 09:37:35 +0000 (09:37 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Mon, 16 Feb 2015 09:37:35 +0000 (09:37 +0000)
commitb7a7566165fc2e878447cb23a76710ea6075f858
treec08dc5508ee20d6ce2c371d15760b23df607dc41
parent415561b6e077fb4dda5d59c699829c9e7d39e08e
IR: SrcTy == DstTy doesn't imply that a cast is valid

Cast validity depends on the cast's kind, not just its types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229366 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/Instructions.cpp
test/Assembler/invalid_cast4.ll [new file with mode: 0644]