[LLVMdev] [PATCH] Fix arm sbfx/ubfx generation
David Conrad
lessen42 at gmail.com
Tue Oct 20 20:21:25 PDT 2009
On Oct 20, 2009, at 10:27 PM, David Conrad wrote:
> Hi,
>
> Currently llvm can generate an invalid sbfx/ubfx op, for instance
> when compiling encoder/analyse.c in x264 (I'll reduce this to a test
> case if needed):
Well I just read the dev policy and saw that this was required, so
test case attached. It'll break if llvm starts emitting the lsl r0,
r0, #3 / asr r0, r0, #1 variants for shifts, not sure how to handle
that.
> LSB isn't checked to ensure it's non-negative. In addition, LSB +
> Width cannot be >32, since it reduces to (Srl_imm - Shl_imm) + (32 -
> Srl_imm) == 32 - Shl_imm, and it was already assert()ed that 0 <
> Shl_imm < 32. So that check is just replaced by if (LSB < 0)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-arm-neg-bfx-2.diff
Type: application/octet-stream
Size: 1025 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091020/ebbc6ebd/attachment.obj>
More information about the llvm-dev
mailing list