[all-commits] [llvm/llvm-project] 95bda5: [ConstantFold] Fold the comparison of bitcasted gl...

cuishimin via All-commits all-commits at lists.llvm.org
Tue Oct 20 12:44:44 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 95bda510fb7b35ac66fe96b0f24f0ec16005802f
      https://github.com/llvm/llvm-project/commit/95bda510fb7b35ac66fe96b0f24f0ec16005802f
  Author: Shimin Cui <scui at ca.ibm.com>
  Date:   2020-10-20 (Tue, 20 Oct 2020)

  Changed paths:
    M llvm/lib/IR/ConstantFold.cpp
    A llvm/test/Transforms/InstCombine/icmp-bitcast-glob.ll
    M llvm/test/Transforms/InstCombine/pr32686.ll
    M llvm/test/Transforms/SCCP/ip-ranges-select.ll
    M llvm/test/Transforms/SCCP/undef-resolve.ll

  Log Message:
  -----------
  [ConstantFold] Fold the comparison of bitcasted global values

This is to simplify icmp instructions in the form like:

%cmp = icmp eq i32 (i8*, i8*)* bitcast (i32 (i32**, i32**)* @f32 to i32
%(i8*, i8*)), bitcast (i32 (i64**, i64**) @f64 to i32 (i8*, i8*)*)

Here @f32 and @f64 are two functions.

Differential Revision: https://reviews.llvm.org/D87850




More information about the All-commits mailing list