[PATCH] D77542: [PowerPC] Treat 'Z' inline asm constraint as a true memory constraint

Amy Kwan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 11 15:07:43 PDT 2020


amyk added inline comments.


================
Comment at: clang/lib/Basic/Targets/PPC.h:277
       break;
     case 'Q': // Memory operand that is an offset from a register (it is
               // usually better to use `m' or `es' in asm statements)
----------------
nemanjai wrote:
> amyk wrote:
> > Just curious, but does this case still require `Info.setAllowsMemory();` as well?
> I don't want to change the behaviour of a QPX-specific asm constraint, so I'd rather leave it as-is. `Q` will set both, `Z` will only set "memory".
I see. Thanks for explaining. 


================
Comment at: clang/test/CodeGen/ppc64-inline-asm.c:50
+// CHECK-LABEL: void @testZwOff(i8* %addr, i64 %off)
+// CHEC: %[[VAL:[^ ]+]] = getelementptr i8, i8* %addr, i64 %off
+// CHEC: call void asm sideeffect "dcbz ${0:y}\0A", "*Z,~{memory}"(i8* %[[VAL]])
----------------
Missing a `k` in `CHECK`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77542/new/

https://reviews.llvm.org/D77542





More information about the cfe-commits mailing list