[libc-commits] [clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] Add clarifying parenthesis around non-trivial conditions in ternary expressions. (PR #90391)

Fangrui Song via libc-commits libc-commits at lists.llvm.org
Sat May 4 10:51:47 PDT 2024


================
@@ -3802,7 +3802,7 @@ bool X86AsmParser::validateInstruction(MCInst &Inst, const OperandVector &Ops) {
     //    VFMULCPHZrr   Dest, Src1, Src2
     //    VFMULCPHZrrk  Dest, Dest, Mask, Src1, Src2
     //    VFMULCPHZrrkz Dest, Mask, Src1, Src2
-    for (unsigned i = TSFlags & X86II::EVEX_K ? 2 : 1;
----------------
MaskRay wrote:

I know it's subjective, but the new code with two levels of parens decreases readability.

https://github.com/llvm/llvm-project/pull/90391


More information about the libc-commits mailing list