[PATCH] D64119: [PowerPC] Support constraint code "ww"

2019-07-03 Thread Fangrui Song via Phabricator via cfe-commits
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=207971#toc Repository: rL LLVM CHANGES SINCE

[PATCH] D64119: [PowerPC] Support constraint code "ww"

2019-07-03 Thread Fangrui Song via Phabricator via cfe-commits
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));

[PATCH] D64119: [PowerPC] Support constraint code "ww"

2019-07-03 Thread Jinsong Ji via Phabricator via cfe-commits
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': //

[PATCH] D64119: [PowerPC] Support constraint code "ww"

2019-07-03 Thread Fangrui Song via Phabricator via cfe-commits
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

[PATCH] D64119: [PowerPC] Support constraint code "ww"

2019-07-03 Thread Fangrui Song via Phabricator via cfe-commits
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)

[PATCH] D64119: [PowerPC] Support constraint code "ww"

2019-07-03 Thread Fangrui Song via Phabricator via cfe-commits
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, ::VSRCRegClass); - } else if (Constraint == "ws" && Subtarget.hasVSX()) { + } else if ((Constraint == "ws" ||

[PATCH] D64119: [PowerPC] Support constraint code "ww"

2019-07-03 Thread Jinsong Ji via Phabricator via cfe-commits
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': //

[PATCH] D64119: [PowerPC] Support constraint code "ww"

2019-07-02 Thread Fangrui Song via Phabricator via cfe-commits
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