[SelectionDAG][FIX] Allow "returned" arguments to be bit-casted
authorJohannes Doerfert <jdoerfert@anl.gov>
Tue, 4 Jun 2019 20:34:43 +0000 (20:34 +0000)
committerJohannes Doerfert <jdoerfert@anl.gov>
Tue, 4 Jun 2019 20:34:43 +0000 (20:34 +0000)
commit6b432dca5d4aa6bea8a39e7858f8cfd19f2b87ed
treed0438462d908535c0dc778db5d36fbf8f7d9d52b
parent40107ce753ff172f76ceb67da2817868f952c003
[SelectionDAG][FIX] Allow "returned" arguments to be bit-casted

Summary:
An argument that is return by a function but bit-casted before can still
be annotated as "returned". Make sure we do not crash for this case.

Reviewers: sunfish, stephenwlin, niravd, arsenm

Subscribers: wdng, hiraditya, bollu, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D59917

llvm-svn: 362546
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/test/CodeGen/X86/arg_returned_bitcast.ll [new file with mode: 0644]