Fix isa<> check which could never be true.
authorPete Cooper <peter_cooper@apple.com>
Fri, 22 Feb 2013 01:50:38 +0000 (01:50 +0000)
committerPete Cooper <peter_cooper@apple.com>
Fri, 22 Feb 2013 01:50:38 +0000 (01:50 +0000)
commitb704ffbb46cae716dc51bd8e6ba425c0a4949a47
treecc441747224d2c36235bc6d309aff22281ac020c
parent667754e239538350c5bd8581772f414783ac71a2
Fix isa<> check which could never be true.

It was incorrectly checking a Function* being an IntrinsicInst* which
isn't possible.  It should always have been checking the CallInst* instead.

Added test case for x86 which ensures we only get one constant load.
It was 2 before this change.

rdar://problem/13267920

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