[PATCH] D95540: [AMDGPU][GlobalISel] Remove redundant cmp when copying constant to vcc

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 29 08:31:35 PST 2021


foad added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp:145
+        BuildMI(*BB, &I, DL, TII.get(MovOpc), DstReg)
+            .addImm(ConstVal->Value.getBoolValue() ? -1 : 0);
+      } else {
----------------
Is it really correct to use -1 here if the condition is true? Shouldn't it be "s_mov dst, exec(_lo)" instead?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95540



More information about the llvm-commits mailing list