[PATCH] D44410: [GlobalISel] Zero extend booleans during legalize

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 12 20:26:06 PDT 2018


arsenm added inline comments.


================
Comment at: lib/CodeGen/GlobalISel/MachineIRBuilder.cpp:268-271
+    if (Val.getBitWidth() == 1)
+      V = Val.getValue().zext(Ty.getSizeInBits());
+    else
+      V = Val.getValue().sextOrTrunc(Ty.getSizeInBits());
----------------
This depends on the TargetBooleanContents


Repository:
  rL LLVM

https://reviews.llvm.org/D44410





More information about the llvm-commits mailing list