[PATCH] D58758: GlobalISel: Fix RegBankSelect for REG_SEQUENCE

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 28 10:55:12 PST 2019


qcolombet added a comment.

Nice catch!

Comment below.



================
Comment at: lib/CodeGen/GlobalISel/RegisterBankInfo.cpp:214
     if (IsCopyLike) {
-      OperandsMapping[0] = ValMapping;
-      CompleteMapping = true;
+      if (!OperandsMapping[0]) {
+        if (MI.isRegSequence()) {
----------------
Is it possible that `OperandsMapping[0] != nullptr` at that point?

Essentially when we set `OperandsMapping[0]` we have either `IsCopyLike == true` and we will `break` out right after we set it or we set it outside of `IsCopyLike == true` then we will never get into that block.


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

https://reviews.llvm.org/D58758





More information about the llvm-commits mailing list