[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)
commit525637575cedf7d760e64af6ab0deaf846ca3d11
tree7f03f99827b77dc84e7f819fb12dd8a1dd89b36e
parentf79b906492f1be5e3846cebd34316431991d9762
[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>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201291 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
test/CodeGen/X86/opaque-constant-asm.ll [new file with mode: 0644]