[PATCH] D40231: InstructionSimplify: 'extractelement' with an undef index is undef

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 4 07:31:06 PST 2017


spatel added inline comments.


================
Comment at: test/CodeGen/AMDGPU/indirect-addressing-si-noopt.ll:24
+; CHECK-LABEL: {{^}}extract_adjacent_blocks:
+define amdgpu_kernel void @extract_adjacent_blocks(i32 %arg) #0 {
+bb:
----------------
zvi wrote:
> arsenm wrote:
> > The checks were still dropped. Does -O0 prevent the inst simplify?
> > 
> > I really wish llc ran no IR optimizations, but we're stuck working around it
> llc -O0 should be running only IR passes required for functionality, so if InstSimplify is invoked, i would consider it as a bug.
I was curious how we get here, so I can confirm that -O0 prevents the instsimplify. Instsimplification is being invoked via early-cse which is being added by AMDGPUPassConfig::addEarlyCSEOrGVNPass(). It should be easy enough to add a cl::opt to customize that, but I don't think we should require that for this instsimplify patch to proceed.


https://reviews.llvm.org/D40231





More information about the llvm-commits mailing list