qemu/tcg
WANG Rui 903045d724 tcg/optimize: Fix folding of vector bitsel
It looks like a typo. When the false value (C) is the constant -1, the
correct fold should be: R = B | ~A

Reproducer (LoongArch64 assembly):

     .text
     .globl  _start
 _start:
     vldi    $vr1, 3073
     vldi    $vr2, 1023
     vbitsel.v       $vr0, $vr2, $vr1, $vr2
     vpickve2gr.d    $a1, $vr0, 1
     xori    $a0, $a1, 1
     li.w    $a7, 93
     syscall 0

Fixes: e58b977238 ("tcg/optimize: Optimize bitsel_vec")
Link: https://github.com/llvm/llvm-project/issues/159610
Signed-off-by: WANG Rui <wangrui@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20250919124901.2756538-1-wangrui@loongson.cn>
(cherry picked from commit a50347a414)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2025-09-26 09:58:36 +03:00
..
aarch64 tcg: Drop TCGContext.page_{mask,bits} 2025-05-28 08:08:47 +01:00
arm tcg: Drop TCGContext.page_{mask,bits} 2025-05-28 08:08:47 +01:00
i386 tcg: Drop TCGContext.page_{mask,bits} 2025-05-28 08:08:47 +01:00
loongarch64 tcg: Drop TCGContext.page_{mask,bits} 2025-05-28 08:08:47 +01:00
mips tcg: Drop TCGContext.page_{mask,bits} 2025-05-28 08:08:47 +01:00
ppc tcg: Drop TCGContext.page_{mask,bits} 2025-05-28 08:08:47 +01:00
riscv tcg/riscv: Fix typo in tgen_extract 2025-06-30 07:42:38 -06:00
s390x tcg: Drop TCGContext.page_{mask,bits} 2025-05-28 08:08:47 +01:00
sparc64 tcg: Drop TCGContext.page_{mask,bits} 2025-05-28 08:08:47 +01:00
tci tcg: Remove tcg_out_op 2025-04-28 13:40:17 -07:00
debuginfo.c accel/tcg: Move perf and debuginfo support to tcg/ 2024-01-29 21:04:10 +10:00
meson.build meson: remove lib{system, user}_ss aliases 2025-05-26 17:31:06 +02:00
optimize.c tcg/optimize: Fix folding of vector bitsel 2025-09-26 09:58:36 +03:00
perf.c tcg: Drop TCGContext.page_{mask,bits} 2025-05-28 08:08:47 +01:00
region.c tcg: Pass max_threads not max_cpus to tcg_init 2025-04-23 15:07:32 -07:00
tcg-common.c tcg: Constify tcg_op_defs 2025-01-16 20:57:16 -08:00
tcg-has.h tcg: Remove add2/sub2 opcodes 2025-04-28 13:40:17 -07:00
tcg-internal.h tcg: Add TCGType to tcg_op_insert_{after,before} 2025-04-28 13:40:15 -07:00
tcg-op-gvec.c tcg: Split out tcg_gen_gvec_dup_imm_var 2025-06-23 11:44:28 -07:00
tcg-op-ldst.c tcg: Drop TCGContext.page_{mask,bits} 2025-05-28 08:08:47 +01:00
tcg-op-vec.c tcg: Only include 'tcg-has.h' when necessary 2025-01-16 20:57:16 -08:00
tcg-op.c tcg: Merge INDEX_op_st*_{i32,i64} 2025-04-28 13:40:17 -07:00
tcg.c tcg: Use uintptr_t in tcg_malloc implementation 2025-07-11 10:43:47 -06:00
tci.c tcg: Merge INDEX_op_{ld,st}_{i32,i64,i128} 2025-04-28 13:40:17 -07:00