[PATCH] D95540: [AMDGPU][GlobalISel] Remove redundant cmp when copying constant to vcc
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 29 08:35:11 PST 2021
arsenm 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 {
----------------
foad wrote:
> Is it really correct to use -1 here if the condition is true? Shouldn't it be "s_mov dst, exec(_lo)" instead?
I think it's an open question if an s1 value means a boolean anded with the correct exec mask. My current thinking is the answer is no and the uses that care are responsible for masking out exec bits
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