Fix Wbitwise-instead-of-logical warning

`a || b` only evaluates b if a is false. `a | b` always evaluates
both a and b. If a and b are of type bool, `||` is usually what you
want, so clang now warns on `|` where both arguments are of type bool.

In this case the difference isn't important, but || is more
conventional to express this

Bug: chromium:1255745
Change-Id: I8fb090abc9863f7db8761bddb1440613a49bc84b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3231077
Auto-Submit: Hans Wennborg <hans@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77452}
This commit is contained in:
Hans Wennborg 2021-10-19 11:09:30 +02:00 committed by V8 LUCI CQ
parent f6fd4969c9
commit 1526103616

View File

@ -2627,7 +2627,7 @@ void Assembler::fmov(const VRegister& vd, float imm) {
DCHECK(vd.Is1S());
Emit(FMOV_s_imm | Rd(vd) | ImmFP(imm));
} else {
DCHECK(vd.Is2S() | vd.Is4S());
DCHECK(vd.Is2S() || vd.Is4S());
Instr op = NEONModifiedImmediate_MOVI;
Instr q = vd.Is4S() ? NEON_Q : 0;
Emit(q | op | ImmNEONFP(imm) | NEONCmode(0xF) | Rd(vd));