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

Zvi Rackover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 4 11:40:15 PST 2017


zvi 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:
----------------
spatel wrote:
> 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.
If the test is intended to cover post-isel handling of undef operands, consider replacing with a .mir test.


https://reviews.llvm.org/D40231





More information about the llvm-commits mailing list