ARM: restrict register class for WIN__DBZCHK
authorSaleem Abdulrasool <compnerd@compnerd.org>
Thu, 21 Apr 2016 23:53:19 +0000 (23:53 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Thu, 21 Apr 2016 23:53:19 +0000 (23:53 +0000)
commita0288535408cb58797a27465fed838753fcc6238
treea766f9a8178548e22c681bf54ce5c186c3b7a96b
parentf07dd8d0a925dd8cbde7bb6198c1ba92446110ea
ARM: restrict register class for WIN__DBZCHK

WIN__DBZCHK will insert a CBZ instruction into the stream.  This instruction
reserves 3 bits for the condition register (rn).  As such, we must ensure that
we restrict the register to a low register.  Use the tGPR class instead of GPR
to ensure that this is properly constrained.  In debug builds, we would attempt
to use lr as a condition register which would silently get truncated with no
hint that the register selection was incorrect.

llvm-svn: 267080
llvm/lib/Target/ARM/ARMInstrInfo.td
llvm/test/CodeGen/ARM/Windows/dbzchk.ll