[llvm] a7c05bf - [ValueLattice] Remove redundant check (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 19 06:22:34 PST 2023
Author: Nikita Popov
Date: 2023-12-19T15:22:23+01:00
New Revision: a7c05bfd16beba8577d4cbdfd23503ccb0b297d5
URL: https://github.com/llvm/llvm-project/commit/a7c05bfd16beba8577d4cbdfd23503ccb0b297d5
DIFF: https://github.com/llvm/llvm-project/commit/a7c05bfd16beba8577d4cbdfd23503ccb0b297d5.diff
LOG: [ValueLattice] Remove redundant check (NFC)
This will already be checked inside markConstant().
Added:
Modified:
llvm/include/llvm/Analysis/ValueLattice.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/ValueLattice.h b/llvm/include/llvm/Analysis/ValueLattice.h
index 5ae32b5e775e5b..2898cdd3d7b0ca 100644
--- a/llvm/include/llvm/Analysis/ValueLattice.h
+++ b/llvm/include/llvm/Analysis/ValueLattice.h
@@ -202,10 +202,7 @@ class ValueLatticeElement {
static ValueLatticeElement get(Constant *C) {
ValueLatticeElement Res;
- if (isa<UndefValue>(C))
- Res.markUndef();
- else
- Res.markConstant(C);
+ Res.markConstant(C);
return Res;
}
static ValueLatticeElement getNot(Constant *C) {
More information about the llvm-commits
mailing list