ARROW-11595: [C++][NIGHTLY:test-conda-cpp-valgrind] Avoid branching on potentially indeterminate values in GenerateBitsUnrolled
ARROW-11595: [C++][NIGHTLY:test-conda-cpp-valgrind] Avoid branching on potentially indeterminate values in GenerateBitsUnrolled

Comparison kernels generate an output bitmap for all array values, including those masked by a null bit. This should be fine since the indeterminate bits are also masked in the output but valgrind still triggers on the branching in GenerateBitsUnrolled.

Fix: replace branching with equivalent multiplication.

Closes #9471 from bkietz/11595-GenerateBitsUnrolled-trig

Authored-by: Benjamin Kietzman <be26f8d5d161e4d7965ee00602589fb2b74149f2@gmail.com>
Signed-off-by: Antoine Pitrou <9359a4d812173b65a3a0094cd86363e79731a3c2@python.org>

cpcloud/arrow,laurentgo/arrow,kou/arrow,kou/arrow,laurentgo/arrow,apache/arrow,cpcloud/arrow,apache/arrow,apache/arrow,laurentgo/arrow,kou/arrow,laurentgo/arrow,kou/arrow,icexelloss/arrow,laurentgo/arrow,apache/arrow,wesm/arrow,wesm/arrow,icexelloss/arrow,kou/arrow,laurentgo/arrow,icexelloss/arrow,cpcloud/arrow,wesm/arrow,apache/arrow,laurentgo/arrow,cpcloud/arrow,wesm/arrow,wesm/arrow,apache/arrow,icexelloss/arrow,icexelloss/arrow,cpcloud/arrow,laurentgo/arrow,kou/arrow,apache/arrow,laurentgo/arrow,kou/arrow,cpcloud/arrow,wesm/arrow,kou/arrow,cpcloud/arrow,kou/arrow,apache/arrow,icexelloss/arrow,apache/arrow,wesm/arrow,apache/arrow,laurentgo/arrow,cpcloud/arrow,apache/arrow,cpcloud/arrow,wesm/arrow,kou/arrow,laurentgo/arrow,wesm/arrow,wesm/arrow,icexelloss/arrow,icexelloss/arrow,cpcloud/arrow,apache/arrow,laurentgo/arrow,kou/arrow,icexelloss/arrow,apache/arrow,laurentgo/arrow,cpcloud/arrow,kou/arrow,icexelloss/arrow,icexelloss/arrow,wesm/arrow,laurentgo/arrow,icexelloss/arrow,icexelloss/arrow,apache/arrow,kou/arrow,laurentgo/arrow,kou/arrow,cpcloud/arrow,icexelloss/arrow,wesm/arrow,cpcloud/arrow,cpcloud/arrow,wesm/arrow,wesm/arrow