[PATCH] D23276: [X86][SSE] Fix memory folding of (v)roundsd / (v)roundss

Quentin Colombet via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 8 17:25:47 PDT 2016


qcolombet accepted this revision.
qcolombet added a comment.
This revision is now accepted and ready to land.

LGTM.


================
Comment at: test/CodeGen/X86/stack-folding-fp-avx1.ll:1565
@@ +1564,3 @@
+  ;CHECK:       vroundsd $7, {{-?[0-9]*}}(%rsp), {{%xmm[0-9][0-9]*}}, {{%xmm[0-9][0-9]*}} {{.*#+}} 16-byte Folded Reload
+  %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{flags}"()
+  %2 = call <2 x double> @llvm.x86.sse41.round.sd(<2 x double> %a0, <2 x double> %a1, i32 7)
----------------
Do you actually need to define something?
I mean wouldn’t the following work:
tail call void asm sideeffect "nop", "~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{flags}”()

(I.e., get rid of =x and %1.)

On the other hand, I see this is consistent with the surrounding test cases, so that’s fine. I guess we could fix all of them in a separate patch if we want to.


Repository:
  rL LLVM

https://reviews.llvm.org/D23276





More information about the llvm-commits mailing list