[PATCH] D50977: [TableGen] Examine entire subreg compositions to detect ambiguity

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 27 06:53:24 PST 2018


bjope added inline comments.


================
Comment at: test/TableGen/ambiguous-composition.td:16
+let Namespace = "Test" in {
+  def subreg_l32  : SubRegIndex<32, 32>;
+  def subreg_h32  : SubRegIndex<32, 32>;
----------------
I assume this should be
  def subreg_l32  : SubRegIndex<32, 0>;
or 
  def subreg_l32  : SubRegIndex<32>;

(I think the tested scenario still should be valid, but we avoid the possible confusion with subreg_h32 and subreg_l32 having the same definition)


================
Comment at: test/TableGen/ambiguous-composition.td:37
+// 
+// For the register V0Q, subreg_hh32(V0Q) = subreg_h32(V0Q) = F0S, which
+// would be enough to trigger the warning about ambiguous composition.
----------------
Isn't this ambiguity still making the register/subregister definitions for SystemZ a little bit dubious. I do not have an example where it actually is causing any problems, but it feels weird.
Anyway, if there is no better way to describe the SystemZ registers I guess we have to live with this oddity.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D50977





More information about the llvm-commits mailing list