------- Comment #21 from dave at hiauly1 dot hia dot nrc dot ca 2006-06-25 15:32 ------- Subject: Re: [4.2 Regression] FAIL: gcc.c-torture/execute/builtin-bitops-1.c execution, -O3 -fomit-frame-pointer -funroll-loops
> I looked at the documentation for lshiftrt, but it doesn't say > whether the shift amount range handled by the PA insn for variable > shifts is ok or not. On the otherhand, there's no obvious reason > why we should need to support logical right shifts larger than 31 > bits and I have to wonder why the generated code does this. I looked at this a bit more and I believe that this behavior is normal when SHIFT_COUNT_TRUNCATED is defined. The test doesn't fail with -fno-unroll-loops-all-loops. It appears to me that this is a loop unrolling rather than a loop invariant bug, although I must admit it's not clear where things actually go wrong because of the complexity of this operation. I modified the testcase a bit to make debugging easier. I've attached the modified testcase and the dumps from loop2_unroll, loop2_done, web and cse2. The initialization of "count" in the block after code_label 21 definitely appears wrong after cse2. I've also attached the final assembly code for reference. Dave ------- Comment #22 from dave at hiauly1 dot hia dot nrc dot ca 2006-06-25 15:32 ------- Created an attachment (id=11748) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11748&action=view) ------- Comment #23 from dave at hiauly1 dot hia dot nrc dot ca 2006-06-25 15:32 ------- Created an attachment (id=11749) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11749&action=view) ------- Comment #24 from dave at hiauly1 dot hia dot nrc dot ca 2006-06-25 15:32 ------- Created an attachment (id=11750) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11750&action=view) ------- Comment #25 from dave at hiauly1 dot hia dot nrc dot ca 2006-06-25 15:32 ------- Created an attachment (id=11751) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11751&action=view) ------- Comment #26 from dave at hiauly1 dot hia dot nrc dot ca 2006-06-25 15:32 ------- Created an attachment (id=11752) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11752&action=view) ------- Comment #27 from dave at hiauly1 dot hia dot nrc dot ca 2006-06-25 15:32 ------- Created an attachment (id=11753) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11753&action=view) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26244