]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
iropt-test tweak
authorFlorian Krohm <flo2030@eich-krohm.de>
Tue, 12 Aug 2025 21:27:14 +0000 (21:27 +0000)
committerFlorian Krohm <flo2030@eich-krohm.de>
Tue, 12 Aug 2025 21:27:14 +0000 (21:27 +0000)
No need to run random tests for binary IROps with 1-bit wide operands.

none/tests/iropt-test/binary.c

index 0d40a4da3e8845776f5d1084e3cc50bcc433b4cb..896d57630ed8ca06f0ae328465670f23fc08b504 100644 (file)
@@ -72,6 +72,9 @@ run_random_tests(const irop_t *op, test_data_t *data)
    opnd_t *opnd_l = &data->opnds[0];
    opnd_t *opnd_r = &data->opnds[1];
 
+   /* 1-bit wide operands are tested exhaustively. Skip random tests. */
+   if (opnd_l->type == Ity_I1 && opnd_r->type == Ity_I1) return;
+
    for (unsigned i = 0; i < num_random_tests; ++i) {
       opnd_l->value = get_random_value(opnd_l->type);
       opnd_r->value = get_random_value(opnd_r->type);