]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Bug 399444 s390x: Drop unnecessary check in s390_irgen_VSLDB
authorAndreas Arnez <arnez@linux.ibm.com>
Tue, 9 Oct 2018 09:22:27 +0000 (11:22 +0200)
committerAndreas Arnez <arnez@linux.ibm.com>
Wed, 10 Oct 2018 12:19:36 +0000 (14:19 +0200)
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.

VEX/priv/guest_s390_toIR.c

index c594ad51bf1213544f0467b0b0627b4ab625459c..60b608138306c637f5bbf7e4a05c3421b855a21f 100644 (file)
@@ -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)),