[all-commits] [llvm/llvm-project] 6db3ed: [SCCP] Don't check for UndefValue before calling m...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Thu Jul 14 01:06:15 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6db3edc8588c036680a8696e1735ffc52cb57156
https://github.com/llvm/llvm-project/commit/6db3edc8588c036680a8696e1735ffc52cb57156
Author: Nikita Popov <npopov at redhat.com>
Date: 2022-07-14 (Thu, 14 Jul 2022)
Changed paths:
M llvm/lib/Transforms/Utils/SCCPSolver.cpp
M llvm/test/Transforms/SCCP/undef-resolve.ll
Log Message:
-----------
[SCCP] Don't check for UndefValue before calling markConstant()
The value lattice explicitly represents undef, and markConstant()
internally checks for UndefValue and will create an undef rather
than constant lattice element in that case.
This is mostly a code simplification, it has little practical impact
because we usually get undef results from undef operands, and those
don't get processed.
Only leave the check behind for the CmpInst case, because it
currently goes through this incorrect code in the getCompare()
implementation: https://github.com/llvm/llvm-project/blob/f98697642cea761448dc0f84f750d3f5def8af6b/llvm/include/llvm/Analysis/ValueLattice.h#L456-L457
Differential Revision: https://reviews.llvm.org/D128330
More information about the All-commits
mailing list