[clang] [clang][RISCV] Correct the SEW operand of indexed/fault only first segment intrinsics (PR #111476)

Jerry Zhang Jian via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 9 02:19:53 PDT 2024


jerryzj wrote:

This patch seems to introduce a new compile-time warning

```
/llvm-project/clang/utils/TableGen/RISCVVEmitter.cpp:179:9: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
  179 |         (RVVI->isMasked() && (RVVI->getPolicyAttrsBits() & RVV_VTA) &&
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  180 |          (RVVI->getPolicyAttrsBits() & RVV_VMA)) |
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                  ||
  181 |         (!RVVI->isMasked() && (RVVI->getPolicyAttrsBits() & RVV_VTA));
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/llvm-project/clang/utils/TableGen/RISCVVEmitter.cpp:179:9: note: cast one or both operands to int to silence this warning
1 warning generated.
```

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


More information about the cfe-commits mailing list