[PATCH] D47576: [InstCombine] Fix div handling

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 31 18:15:08 PDT 2018


skatkov added inline comments.


================
Comment at: test/Transforms/InstCombine/sdiv-guard.ll:1
+; RUN: opt < %s -instcombine -inline -S | FileCheck %s
+
----------------
spatel wrote:
> This test already passes without the patch. Please create a test that shows the diff and use utils/update_test_checks.py to generate checks for it.
> 
> Also, we shouldn't need -inline to show a failure in instcombine.
Test actually shows the diff. Without this patch it will transform guard condition to %X != 0 which is incorrect because if X is not 0 and flag is false gaurd should be triggered.


https://reviews.llvm.org/D47576





More information about the llvm-commits mailing list