[PATCH] D82261: [ValueTracking, BasicAA] Don't simplify instructions

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 20 08:58:45 PDT 2020


nikic marked an inline comment as done.
nikic added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/promote-alloca-to-lds-select.ll:78
   ret void
 }
 
----------------
Let me explain what is going on here: We have selects on undefs involved here, which means that instruction simplification will simplify to the first select operand. If a real condition is used, then that of course doesn't happen. Because of that, this test is not testing anything useful right now.

In fact, I think this indicates that the current usage of SimplifyInstruction inside GetUnderlyingObject may be subtly unsound. GetUnderlyingObject will declare that the first select operand is the underlying object, but other code is permitted to later simplify that select to the second operand instead. In this case optimizations may have been performed based on an incorrect assumption. (While undef can be true or false, it cannot be both at the same time.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82261





More information about the llvm-commits mailing list