[PATCH] D31902: Use correct registers for "A" inline asm constraint

Dimitry Andric via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 13 14:47:48 PDT 2017


dim added inline comments.


================
Comment at: test/CodeGen/X86/inline-asm-A-constraint.ll:1
+; RUN: llc < %s -march=x86-64 -no-integrated-as
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
----------------
ab wrote:
> '-march=x86_64' -> '-mtriple=x86_64--' ?  Helps avoid sensitivity to the host (not that it matters in this file) and lets you get rid of the IR triple.
> 
> Also, '-no-integrated-as' doesn't have an effect here, right?
I copied this example from other inline asm tests, most of which seem to use -no-integrated-as. I'm not sure why that was done, maybe because in some cases invalid mnemonics (e.g. `foo`) are used, and that could trip up the test?

Similar for the -march flag, most test cases seem to use plain `x86_64`.  But it's a good idea to remove host influences, thanks.


================
Comment at: test/CodeGen/X86/inline-asm-A-constraint.ll:9
+entry:
+  %0 = call i128 asm "", "=A,~{dirflag},~{fpsr},~{flags}"()
+  store i128 %0, i128* @x, align 16
----------------
ab wrote:
> Can you add CHECK lines for the generated asm?
Since the asm statement is completely empty, there is nothing generated except `#APP` and `#NO_APP`.  Does it make sense to check for that?


https://reviews.llvm.org/D31902





More information about the llvm-commits mailing list