[AArch64][FastISel] Always use an AND instruction when truncating to non-legal types.
authorJuergen Ributzka <juergen@apple.com>
Sat, 25 Jul 2015 02:16:53 +0000 (02:16 +0000)
committerJuergen Ributzka <juergen@apple.com>
Sat, 25 Jul 2015 02:16:53 +0000 (02:16 +0000)
commite928ceb9e61b9cee0109ec5f37ea05176740d4ef
treedb092319fb4ce4c506fc4c9f2980460377031232
parente05397b4aea8e63cdc3f9a663ebcec39d21333b9
[AArch64][FastISel] Always use an AND instruction when truncating to non-legal types.

When truncating to non-legal types (such as i16, i8 and i1) always use an AND
instruction to mask out the upper bits. This was only done when the source type
was an i64, but not when the source type was an i32.

This commit fixes this and adds the missing i32 truncate tests.

This fixes rdar://problem/21990703.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243198 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64FastISel.cpp
test/CodeGen/AArch64/arm64-fast-isel-conversion.ll
test/CodeGen/AArch64/fast-isel-address-extends.ll