OSDN Git Service

[AArch64] Fix fast-isel of cbz of i1, i8, i16
authorOliver Stannard <oliver.stannard@arm.com>
Fri, 24 Oct 2014 09:54:41 +0000 (09:54 +0000)
committerOliver Stannard <oliver.stannard@arm.com>
Fri, 24 Oct 2014 09:54:41 +0000 (09:54 +0000)
commit9bb3f37aa44e39b937802cc9443c6a5aafa1de52
treea5d045766067d78fea1827521a5730234293d11e
parent806ccfff11811e77ec576e271b83293cf957e4f2
[AArch64] Fix fast-isel of cbz of i1, i8, i16

This fixes a miscompilation in the AArch64 fast-isel which was
triggered when a branch is based on an icmp with condition eq or ne,
and type i1, i8 or i16. The cbz instruction compares the whole 32-bit
register, so values with the bottom 1, 8 or 16 bits clear would cause
the wrong branch to be taken.

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