[PATCH] D97208: [X86] Always use rip-relative addressing on 64-bit when rematerializing all zeros/ones registers using a folded load.

Pengfei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 23 05:05:53 PST 2021


pengfei added a comment.

>> None of our lit tests are affected by this for some reason. Maybe the update_llc_test_checks.py is too aggressive with regular expressions?
>
> Confirmed.
>
> `; CHECK-NEXT:    ucomisd {{\.LCPI.*}}, %xmm0`
>
> `.*` hides the `(%rip)` difference.

It's not true. I looked at the code in `llvm/utils/UpdateTestChecks/asm.py`, the script can differentiate the rip from the pure address, e.g

  cd llvm/utils/UpdateTestChecks/
  python
  >>> from UpdateTestChecks import asm
  >>> class T():
  ...   x86_scrub_rip = True
  ...
  >>> asm.scrub_asm_x86('ucomisd .LCPI0_0(%rip), %xmm0', T)
  'ucomisd {{.*}}(%rip), %xmm0'
  >>> asm.scrub_asm_x86('ucomisd .LCPI0_0, %xmm0', T)
  'ucomisd {{\\.LCPI.*}}, %xmm0'

So the `update_llc_test_checks.py` isn't too aggressive to eliminate the difference.
I also check a test `llvm/test/CodeGen/X86/vec_reassociate.ll`, in which we can see the differences between X86 and X64.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97208



More information about the llvm-commits mailing list