This revision was automatically updated to reflect the committed changes.
Closed by commit rL365106: [PowerPC] Support constraint code "ww"
(authored by MaskRay, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D64119?vs=207707&id=207971#toc
Repository:
rL LLVM
CHANGES SINC
MaskRay marked an inline comment as done.
MaskRay added a comment.
float ws_float(float x, float y) {
__asm__ ("xsadddp %0, %1, %2" : "=ws"(x) : "ws"(x), "ws"(y));
return x;
}
float ww_float(float x, float y) {
__asm__ ("xsadddp %0, %1, %2" : "=ww"(x) : "ww"(x), "ww"(y));
ret
jsji accepted this revision.
jsji added a comment.
This revision is now accepted and ready to land.
LGTM. Thanks for investigating GCC behavior.
Comment at: clang/lib/Basic/Targets/PPC.h:211
+ case 's': // VSX vector register to hold scalar double data
+ case 'w': //
MaskRay marked an inline comment as done.
MaskRay added inline comments.
Comment at: clang/lib/Basic/Targets/PPC.h:211
+ case 's': // VSX vector register to hold scalar double data
+ case 'w': // VSX vector register to hold scalar double data
case 'a': // Any VSX
MaskRay marked an inline comment as done.
MaskRay added inline comments.
Comment at: llvm/test/CodeGen/PowerPC/inlineasm-vsx-reg.ll:42
+
+define float @test_ww(float %x, float %y) {
+ %1 = tail call float asm "xsmaxdp ${0:x}, ${1:x}, ${2:x}",
"=^ww,^ww,^ww"(float %x, float %y)
MaskRay marked an inline comment as done.
MaskRay added inline comments.
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:14080
return std::make_pair(0U, &PPC::VSRCRegClass);
- } else if (Constraint == "ws" && Subtarget.hasVSX()) {
+ } else if ((Constraint == "ws" |
jsji added a comment.
It is great to add `ww` for compatibility.
However if we are going to add `ww`, looks like we should update `ws` as well?
Comment at: clang/lib/Basic/Targets/PPC.h:211
+ case 's': // VSX vector register to hold scalar double data
+ case 'w': //
MaskRay created this revision.
MaskRay added reviewers: awilfox, echristo, hfinkel, jsji, kbarton, nemanjai.
Herald added subscribers: llvm-commits, cfe-commits, hiraditya.
Herald added projects: clang, LLVM.
"ww" and "ws" are both constraint codes for VSX vector registers that
holds scalar double