From: Andreas Arnez Date: Tue, 9 Oct 2018 09:22:27 +0000 (+0200) Subject: Bug 399444 s390x: Drop unnecessary check in s390_irgen_VSLDB X-Git-Tag: VALGRIND_3_15_0~174 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca2f73592e8e74a5328df0a65e0831bc1fc6dd28;p=thirdparty%2Fvalgrind.git Bug 399444 s390x: Drop unnecessary check in s390_irgen_VSLDB In s390_irgen_VSLDB there was special handling for the case that the immediate operand i4 has the value 16, which would mean that the result v1 were a full copy of the third operand v3. However, this is impossible because i4 can only assume values from 0 to 15; thus the special handling can be removed. --- diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index c594ad51bf..60b6081383 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -17400,16 +17400,11 @@ s390_irgen_VSLDB(UChar v1, UChar v2, UChar v3, UChar i4) { UChar imm = i4 & 0b00001111; - if (imm == 0) - { + if (imm == 0) { + /* Just copy v2. */ put_vr_qw(v1, get_vr_qw(v2)); - } - else if (imm == 16) - { - put_vr_qw(v1, get_vr_qw(v3)); - } - else - { + } else { + /* Concatenate v2's tail with v3's head. */ put_vr_qw(v1, binop(Iop_OrV128, binop(Iop_ShlV128, get_vr_qw(v2), mkU8(imm * 8)),