[all-commits] [llvm/llvm-project] 908b59: [NFC][Clang][PowerPC] Fix suspicious unsequenced v...

Nikita Terentev via All-commits all-commits at lists.llvm.org
Thu Jul 16 10:45:54 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 908b5931ce3d9630ae3b897bd4c523945038fdcd
      https://github.com/llvm/llvm-project/commit/908b5931ce3d9630ae3b897bd4c523945038fdcd
  Author: Nikita Terentev <svet58585 at mail.ru>
  Date:   2026-07-16 (Thu, 16 Jul 2026)

  Changed paths:
    M clang/test/CodeGen/PowerPC/builtins-ppc-fma.c
    M clang/test/CodeGen/PowerPC/builtins-ppc-fpconstrained.c

  Log Message:
  -----------
  [NFC][Clang][PowerPC] Fix suspicious unsequenced volatile accesses in codegen tests (#199338)

When trying to add new Sema check in PR
https://github.com/llvm/llvm-project/pull/180955 some tests failed.
The following pattern is observed in these tests:
```
volatile x;
x = __builtinXXX(x, x, x);

```
For C and C++ standards order of evaluate funcall argument is
unsequence(or indeterminate sequence) and unsequence access for same
volatile variable is UB(because read volatile qualified variable is
side-effects).

As far as I undestand, unsequenced accesses is unwanted and new warning
is correct.
This PR try to fix it for tests:
```
\clang\test\CodeGen\PowerPC\builtins-ppc-fma.c
\clang\test\CodeGen\PowerPC\builtins-ppc-fpconstrained.c
```
Topics on discourse:
https://discourse.llvm.org/t/suspicious-use-volatile-qualified-variable-in-clang-codegen-tests/90837
Closed similar issue for SystemZ :
https://github.com/llvm/llvm-project/issues/186584



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list