Subzero: hack fix for assert(Dest->hasReg())

Under certain conditions, the Dest value of InstX86Movd doesn't get a
register allocated to it. This is unlikely the right fix, as it's
unidiomatic, but pending further investigation, this seems to do the
trick.

Bug: b/145529686
Change-Id: I5b5d5148aef04ebac957d5941779d5cd8e544098
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38871
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Tested-by: Antonio Maiorano <amaiorano@google.com>
diff --git a/third_party/subzero/src/IceInstX86Base.h b/third_party/subzero/src/IceInstX86Base.h
index 4c62854..6c140d7 100644
--- a/third_party/subzero/src/IceInstX86Base.h
+++ b/third_party/subzero/src/IceInstX86Base.h
@@ -1249,6 +1249,10 @@
   class InstX86Movd : public InstX86BaseUnaryopXmm<InstX86Base::Movd> {
   public:
     static InstX86Movd *create(Cfg *Func, Variable *Dest, Operand *Src) {
+      // TODO(amaiorano): This fixes assert(Dest->hasReg()) in emitIAS when
+      // there are no more registers left to allocate. Revisit this and fix it
+      // the right way. See b/145529686.
+      Dest->setMustHaveReg();
       return new (Func->allocate<InstX86Movd>()) InstX86Movd(Func, Dest, Src);
     }