[PATCH] D57522: GlobalISel: Implement narrowScalar for select

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 4 15:40:32 PST 2019


aemerson added inline comments.


================
Comment at: lib/CodeGen/GlobalISel/LegalizerHelper.cpp:2256
+                    Src2Regs, Src2LeftoverRegs))
+    llvm_unreachable("inconsistent extractParts result");
+
----------------
arsenm wrote:
> aemerson wrote:
> > I think this should either be an assert or return UnableToLegalize and report a fallback.
> This is basically an assert, just a different style that doesn't require a temporary variable that will need a void cast to silence the unused variable warning on in a release build.
> 
> I don't think this should be UnableToLegalize, since it should work if the first call worked. If it were to somehow fail when the first did, it would have created dead instructions (which I guess would be OK?)
True it should always work if the first one did.


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

https://reviews.llvm.org/D57522





More information about the llvm-commits mailing list