Changes

Summary

  1. [mlir][Linalg] Allow folding to rank-zero tensor when using rank-reducing subtensors. (details)
  2. [CGAtomic] Lift strong requirement for remaining compare_exchange combinations (details)
Commit 05a89312d812bb5dcec6deca8f1e28a198ce1167 by ravishankarm
[mlir][Linalg] Allow folding to rank-zero tensor when using rank-reducing subtensors.

The pattern to convert subtensor ops to their rank-reduced versions
(by dropping unit-dims in the result) can also convert to a zero-rank
tensor. Handle that case.
This also fixes a OOB access bug in the existing pattern for such
cases.

Differential Revision: https://reviews.llvm.org/D101949
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp
The file was modifiedmlir/test/Dialect/Linalg/drop-unit-extent-dims.mlir
Commit 819e0d105e84c6081cfcfa0e38fd257b6124553a by bruno.cardoso
[CGAtomic] Lift strong requirement for remaining compare_exchange combinations

Follow up on 431e3138a and complete the other possible combinations.

Besides enforcing the new behavior, it also mitigates TSAN false positives when
combining orders that used to be stronger.
The file was modifiedclang/lib/CodeGen/CGAtomic.cpp
The file was modifiedllvm/lib/IR/Verifier.cpp
The file was modifiedllvm/lib/IR/Instructions.cpp
The file was modifiedclang/test/CodeGen/atomic-ops.c
The file was modifiedclang/test/CodeGenOpenCL/atomic-ops.cl
The file was modifiedllvm/lib/AsmParser/LLParser.cpp