[PATCH] D93239: GlobalISel: Return APInt from getConstantVRegVal

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 16 11:02:50 PST 2020


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:1413
     return false; // Leave it to the legalizer to lower it to a libcall.
-  unsigned KnownLen = LenVRegAndVal->Value;
+  unsigned KnownLen = LenVRegAndVal->Value.getZExtValue();
 
----------------
paquette wrote:
> Why `getZExtValue` here rather than `getSExtValue`? Looks more correct considering it's an unsigned, but the old behaviour would have gotten the sign extended value.
Yes, I'm assuming this is supposed to be an unsigned value


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

https://reviews.llvm.org/D93239



More information about the llvm-commits mailing list