[PATCH] D75801: [InstCombine] Remove known bits constant folding (WIP)

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 7 19:24:40 PST 2020


jdoerfert added inline comments.


================
Comment at: test/Transforms/InstCombine/assume.ll:340
+; CHECK-NEXT:    tail call void @llvm.assume(i1 [[CMP2]])
+; CHECK-NEXT:    ret i32 0
 ;
----------------
nikic wrote:
> I'm not sure we really need to do anything about this, I think it's only important that we have an assume(false) here, and SimplifyCFG will deal with the rest.
> 
> If we do want to improve on this, we could convert assume(false) into store undef (the InstCombine UB pattern) and then remove all instructions after store undef.
Can't we replace the UB instruction with unreachable?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75801





More information about the llvm-commits mailing list