summary refs log tree commit diff stats
path: root/include/hw/core
diff options
context:
space:
mode:
authorWANG Rui <wangrui@loongson.cn>2025-09-19 20:49:01 +0800
committerRichard Henderson <richard.henderson@linaro.org>2025-09-23 16:53:38 -0700
commita50347a4145faf6d409afd4b9b682c8b3e60854a (patch)
treeec1dec265b0f9e02136376086c485d3f49afcc93 /include/hw/core
parent76d2b8d42adb0db2d1ccd08a626f25ddd30208a8 (diff)
downloadfocaccia-qemu-a50347a4145faf6d409afd4b9b682c8b3e60854a.tar.gz
focaccia-qemu-a50347a4145faf6d409afd4b9b682c8b3e60854a.zip
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: e58b977238e3 ("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>
Diffstat (limited to 'include/hw/core')
0 files changed, 0 insertions, 0 deletions