[DAG] Fix the recognition of opaque constants in the SelectionDAGBuilder.
authorJuergen Ributzka <juergen@apple.com>
Thu, 13 Feb 2014 04:19:26 +0000 (04:19 +0000)
committerJuergen Ributzka <juergen@apple.com>
Thu, 13 Feb 2014 04:19:26 +0000 (04:19 +0000)
commit2b97f9b21108b3bff00f5d3c60cb6eeb97747e24
tree661d8d658c78fb75bb96f0045d4d822188daae1c
parentea2519c37b79eed0519582a00293d29ecff9441c
[DAG] Fix the recognition of opaque constants in the SelectionDAGBuilder.

This fix checks the original LLVM IR node to identify opaque constants by
looking for the bitcast-constant pattern. Originally we looked at the generated
SDNode, but this might lead to incorrect results. The SDNode could have been
generated by an constant expression that was folded to a constant.

This fixes <rdar://problem/16050719>

llvm-svn: 201291
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/test/CodeGen/X86/opaque-constant-asm.ll [new file with mode: 0644]