[PATCH] D87850: [ConstantFold] Fold the comparison of bitcasted global values
    Eli Friedman via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Oct  5 10:31:12 PDT 2020
    
    
  
efriedma added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/pr32686.ll:35
+  %lnot.ext = zext i1 %lnot to i32
+  %or = or i32 xor (i32 zext (i1 icmp ne (i32* bitcast (i8* @a2 to i32*), i32* @b) to i32), i32 2), %lnot.ext
+  store i32 %or, i32* @b, align 4
----------------
The "extra" version of this testcase isn't really helpful in this context; the version that folds will be folded away before instcombine can see it, so it's only testing constant folding itself.
If you want test coverage for additional constant expressions, please add them to the icmp folding test.
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87850/new/
https://reviews.llvm.org/D87850
    
    
More information about the llvm-commits
mailing list