[PATCH] D80032: [AMDGPU] Always expand ext/insertelement with divergent idx
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 18 08:01:56 PDT 2020
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:102-106
+static cl::opt<bool> ExpandDynVectors(
+ "amdgpu-expand-dynamic-vectors",
+ cl::Hidden,
+ cl::desc("Expand extract and insert vector elements with cmd/cndmask"),
+ cl::init(true));
----------------
I would invert this and rename it. How about -amdgpu-use-divergent-register-indexing, default false?
================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:9549
// instructions.
- if (VecSize <= 256 && (VecSize > 64 || EltSize >= 32) &&
+ // Always do this if var-idx is divergent, otherwise it will become a loop.
+ if (ExpandDynVectors &&
----------------
GlobalISel needs the compare and select path implemented
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80032/new/
https://reviews.llvm.org/D80032
More information about the llvm-commits
mailing list