On 4/13/23 04:57, Segher Boessenkool wrote:
On Wed, Apr 12, 2023 at 10:05:08PM -0600, Jeff Law wrote:
On 4/12/23 10:58, Jakub Jelinek wrote:
Seems my cross defaulted to 32-bit compilation, reproduced it with
additional -mabi=lp64 -march=rv64gv even on the pr108947.c test.
So, let's include that test in the patch too:
2023-04-12 Jeff Law <j...@ventanamicro.com>
Jakub Jelinek <ja...@redhat.com>
PR target/108947
PR target/109040
* combine.cc (simplify_and_const_int_1): Compute nonzero_bits in
word_mode rather than mode if WORD_REGISTER_OPERATIONS and mode is
smaller than word_mode.
* simplify-rtx.cc (simplify_context::simplify_binary_operation_1)
<case AND>: Likewise.
* gcc.dg/pr108947.c: New test.
* gcc.c-torture/execute/pr109040.c: New test.
Bootstrap of the v3 patch has completed. Regression testing is still
spinning. It should be done and waiting for me when I wake up in the
morning.
It's still okay for trunk (of course) if the bootstrap doesn't fail (of
course). Thanks guys!
Bootstrap was successful with v3, but there's hundreds of testsuite
failures due to the simplify-rtx hunk. compile/20070520-1.c for example
when compiled with: -O3 -funroll-loops -march=rv64gc -mabi=lp64d
Thursdays are my hell day. It's unlikely I'd be able to look at this at
all today.
typedef unsigned char uint8_t;
extern uint8_t ff_cropTbl[256 + 2 * 1024];
void ff_pred8x8_plane_c(uint8_t *src, int stride){
int j, k;
int a;
uint8_t *cm = ff_cropTbl + 1024;
const uint8_t * const src0 = src+3-stride;
const uint8_t *src1 = src+4*stride-1;
const uint8_t *src2 = src1-2*stride;
int H = src0[1] - src0[-1];
int V = src1[0] - src2[ 0];
for(k=2; k<=4; ++k) {
src1 += stride; src2 -= stride;
H += k*(src0[k] - src0[-k]);
V += k*(src1[0] - src2[ 0]);
}
H = ( 17*H+16 ) >> 5;
V = ( 17*V+16 ) >> 5;
a = 16*(src1[0] + src2[8]+1) - 3*(V+H);
for(j=8; j>0; --j) {
int b = a;
a += V;
src[0] = cm[ (b ) >> 5 ];
src[1] = cm[ (b+ H) >> 5 ];
src[2] = cm[ (b+2*H) >> 5 ];
src[3] = cm[ (b+3*H) >> 5 ];
src[4] = cm[ (b+4*H) >> 5 ];
src[5] = cm[ (b+5*H) >> 5 ];
src[6] = cm[ (b+6*H) >> 5 ];
src[7] = cm[ (b+7*H) >> 5 ];
src += stride;
}
}
Jeff