Properly check if a CMPZ node is in fact comparing against zero
authorJames Molloy <james.molloy@arm.com>
Mon, 16 Nov 2015 10:49:25 +0000 (10:49 +0000)
committerJames Molloy <james.molloy@arm.com>
Mon, 16 Nov 2015 10:49:25 +0000 (10:49 +0000)
commit61639fb856c1222bea3fca2c92eba17ec67e94ae
tree45d86e4e7cef6b21bc0c326d2f0c0a9f488f224f
parent168146e84b6b96d17093807189d069a4a04e8d06
Properly check if a CMPZ node is in fact comparing against zero

This was left implicit and never ever checked, which means we could have a CMPZ against some non-zero value and we were carrying on with BFI conversion regardless.

Caught by Oliver Stannard using csmith; regression test added.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253195 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelLowering.cpp
test/CodeGen/ARM/bfi.ll