AMDGPU: Fix asserts on invalid register ranges
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 3 Nov 2015 22:50:32 +0000 (22:50 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 3 Nov 2015 22:50:32 +0000 (22:50 +0000)
commit8ad4a20d3e8e24617d3c95b9d963af7132471453
tree51263025704271435a5af00f63d0e926c3653e5d
parente2849a9de0a142696a14cbcef984c2953fb2cb79
AMDGPU: Fix asserts on invalid register ranges

If the requested SGPR was not actually aligned, it was
accepted and rounded down instead of rejected.

Also fix an assert if the range is an invalid size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252009 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
test/MC/AMDGPU/out-of-range-registers.s
test/MC/AMDGPU/smrd.s
test/MC/AMDGPU/sop1.s