[IRBuilder] Migrate and-folding to value-based FoldAnd.
authorFlorian Hahn <flo@fhahn.com>
Thu, 20 Jan 2022 10:22:20 +0000 (10:22 +0000)
committerFlorian Hahn <flo@fhahn.com>
Thu, 20 Jan 2022 10:22:21 +0000 (10:22 +0000)
commit782c0dd1a1c235afb09a34e7da4a1267ead14765
treee8f78c19b83e3a533f93504d46f0df517e7afd2f
parent90efbe697a39b201b37da01fc633c51c24de7837
[IRBuilder] Migrate and-folding to value-based FoldAnd.

Similar to the migration of or-folding to FoldOr, there are a few cases
where the fold in IRBuilder::CreateAnd triggered directly. Those have
been updated.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D117431
17 files changed:
clang/test/CodeGen/catch-nullptr-and-nonzero-offset.c
clang/test/CodeGen/catch-pointer-overflow.c
clang/test/CodeGen/cmse-clear-return.c
llvm/include/llvm/Analysis/InstSimplifyFolder.h
llvm/include/llvm/Analysis/TargetFolder.h
llvm/include/llvm/IR/ConstantFolder.h
llvm/include/llvm/IR/IRBuilder.h
llvm/include/llvm/IR/IRBuilderFolder.h
llvm/include/llvm/IR/NoFolder.h
llvm/test/Transforms/LoopIdiom/X86/left-shift-until-bittest.ll
llvm/test/Transforms/LoopVersioning/bound-check-partially-known.ll
polly/test/CodeGen/invariant_load_base_pointer_conditional.ll
polly/test/CodeGen/multidim_2d_parametric_array_static_loop_bounds.ll
polly/test/CodeGen/no-overflow-tracking.ll
polly/test/CodeGen/run-time-condition-with-scev-parameters.ll
polly/test/ScopInfo/allow-all-parameters-dereferencable.ll
polly/test/ScopInfo/invariant_load_zext_parameter.ll