[FastIsel][AArch64] Fix previous commit r214844 (Don't perform sign-/zero-extension...
authorJuergen Ributzka <juergen@apple.com>
Tue, 5 Aug 2014 07:31:30 +0000 (07:31 +0000)
committerJuergen Ributzka <juergen@apple.com>
Tue, 5 Aug 2014 07:31:30 +0000 (07:31 +0000)
commitbaa40c68ace84fe36739b0dbd335b6100be19e97
treedf6c49e44aca01c484c25cc2849a7646bc72055e
parenteee659a0760bc7fda093307019e4fffe5580a4b7
[FastIsel][AArch64] Fix previous commit r214844 (Don't perform sign-/zero-extension for function arguments that have already been sign-/zero-extended.)

The original code would fail for unsupported value types like i1, i8, and i16.
This fix changes the code to only create a sub-register copy for i64 value types
and all other types (i1/i8/i16/i32) just use the source register without any
modifications.

getRegClassFor() is now guarded by the i64 value type check, that guarantees
that we always request a register for a valid value type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214848 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64FastISel.cpp