Hexagon: Paper over the undefined behaviour introduced by r238692
authorJustin Bogner <mail@justinbogner.com>
Wed, 24 Jun 2015 07:03:07 +0000 (07:03 +0000)
committerJustin Bogner <mail@justinbogner.com>
Wed, 24 Jun 2015 07:03:07 +0000 (07:03 +0000)
commit0b48c1e633a249b150f059b18cc478f6307a01f7
treec9a50ea9d203a8f947e6d9e1f2bf8242a808ce62
parent76bee1a4507e0931e0790457e54d0ac6472f27c0
Hexagon: Paper over the undefined behaviour introduced by r238692

This stops shifting a 32-bit value by such absurd amounts as 96 and
120. We do this by dropping a call to the function that was doing this
entirely, which rather surprisingly doesn't break *any* tests.

I've also added an assert in the misbehaving function to prove that
it's no longer being called with completely invalid arguments.

This change looks pretty bogus and we should probably be reverting
r238692 instead, but this is hard to do with the number of follow ups
that have happened since. It can't be any worse than the undefined
behaviour that was happening before though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240526 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Hexagon/MCTargetDesc/HexagonShuffler.cpp
lib/Target/Hexagon/MCTargetDesc/HexagonShuffler.h