[all-commits] [llvm/llvm-project] c6ff3c: [InstSimplify] Constant fold icmp of gep
Nikita Popov via All-commits
all-commits at lists.llvm.org
Wed Mar 4 14:17:01 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: c6ff3c9bad88d2cd027a8d0149baf1b541b84653
https://github.com/llvm/llvm-project/commit/c6ff3c9bad88d2cd027a8d0149baf1b541b84653
Author: Nikita Popov <nikita.ppv at gmail.com>
Date: 2020-03-04 (Wed, 04 Mar 2020)
Changed paths:
M llvm/lib/Analysis/InstructionSimplify.cpp
M llvm/test/Transforms/InstSimplify/compare.ll
Log Message:
-----------
[InstSimplify] Constant fold icmp of gep
InstSimplify can fold icmps of gep where the base pointers are the
same and the offsets are constant. It does so by constructing a
constant expression icmp and assumes that it gets folded -- but
this doesn't actually happen, because GEP expressions can usually
only be folded by the target-dependent constant folding layer.
As such, we need to explicitly invoke it here.
Differential Revision: https://reviews.llvm.org/D75407
More information about the All-commits
mailing list