hubert.reinterpretcast added inline comments.
Comment at: clang/lib/Basic/Targets/PPC.h:448
+ void setMaxAtomicWidth() override {
+// For layout on ELF targets, we support up to 16 bytes.
+if (getTriple().isOSBinFormatELF())
I believe this should be
hubert.reinterpretcast added inline comments.
Comment at: clang/test/CodeGen/PowerPC/atomic-alignment.c:34
// PPC32: @o = global %struct.O zeroinitializer, align 1{{$}}
// PPC64: @o = global %struct.O zeroinitializer, align 8{{$}}
Just noting that GCC
hubert.reinterpretcast added inline comments.
Comment at: clang/test/CodeGen/PowerPC/atomic-alignment.c:45
+// PPC64: @q = global %struct.Q zeroinitializer, align 16{{$}}
+// AIX64: @q = global %struct.Q zeroinitializer, align 1{{$}}
_Atomic(Q) q; // expected-no-diagnostics
efriedma added inline comments.
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1329
setOperationAction(ISD::INTRINSIC_VOID, MVT::i128, Custom);
}
You probably want an "else" here to call `setMaxAtomicSizeInBitsSupported(64)`
or something like
lkail updated this revision to Diff 418537.
lkail added a comment.
Thanks @efriedma for pointing out. Updated guard code. Also adjust backend to
reflect ABI change.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122377/new/
efriedma added inline comments.
Comment at: clang/lib/Basic/Targets/PPC.h:451
+ MaxAtomicPromoteWidth = 128;
+ MaxAtomicInlineWidth = 128;
+}
MaxAtomicPromoteWidth should not depend on whether quadword-atomics is present,
only the target OS. It
lkail added a comment.
Removed alter of `-ppc-quadword-atomcis` in backend to decouple from frontend.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122377/new/
https://reviews.llvm.org/D122377
___
lkail updated this revision to Diff 418142.
lkail added reviewers: dim, pkubaj.
lkail set the repository for this revision to rG LLVM Github Monorepo.
lkail added subscribers: pkubaj, dim.
lkail added a comment.
@dim @pkubaj We are modifying layout of 16-byte atomic type on Linux to be
MaskRay added inline comments.
Comment at: clang/lib/Basic/Targets/PPC.h:449
+// For layout on Linux, we support up to 16 bytes.
+if (getTriple().isOSLinux() && hasFeature("quadword-atomics")) {
+ MaxAtomicPromoteWidth = 128;
Many `isOSLinux()`
jsji added inline comments.
Comment at: clang/test/CodeGen/PowerPC/atomic-alignment.c:7
+// RUN: -emit-llvm -o - %s | FileCheck %s --check-prefixes=PPC,PPC64-PWR8
// RUN: %clang_cc1 -verify -triple powerpc64-unknown-aix -emit-llvm -o - %s | \
// RUN: FileCheck %s
lkail updated this revision to Diff 417868.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122377/new/
https://reviews.llvm.org/D122377
Files:
clang/lib/Basic/Targets/PPC.cpp
clang/lib/Basic/Targets/PPC.h
clang/test/CodeGen/PowerPC/atomic-alignment.c
lkail created this revision.
lkail added reviewers: hubert.reinterpretcast, jsji, xingxue, PowerPC.
Herald added subscribers: shchenz, kbarton, hiraditya, nemanjai.
Herald added a project: All.
lkail requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers:
12 matches
Mail list logo