[all-commits] [llvm/llvm-project] a09394: [ConstProp][JumpThreading] add more test coverage ...
RotateRight via All-commits
all-commits at lists.llvm.org
Mon Mar 8 06:00:40 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a093942c287501484481384dd03686ffaa5fc98e
https://github.com/llvm/llvm-project/commit/a093942c287501484481384dd03686ffaa5fc98e
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2021-03-08 (Mon, 08 Mar 2021)
Changed paths:
M llvm/test/Transforms/InstSimplify/ConstProp/icmp-null.ll
M llvm/test/Transforms/JumpThreading/thread-two-bbs.ll
Log Message:
-----------
[ConstProp][JumpThreading] add more test coverage for potential nullptr folds; NFC
See D98150.
Commit: f75b5305f4def4973027a9b96fb3f1e50ce056e3
https://github.com/llvm/llvm-project/commit/f75b5305f4def4973027a9b96fb3f1e50ce056e3
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2021-03-08 (Mon, 08 Mar 2021)
Changed paths:
M llvm/lib/IR/ConstantFold.cpp
M llvm/test/CodeGen/PowerPC/pr46923.ll
M llvm/test/Transforms/InstCombine/vector_gep1-inseltpoison.ll
M llvm/test/Transforms/InstCombine/vector_gep1.ll
M llvm/test/Transforms/InstSimplify/ConstProp/icmp-null.ll
M llvm/test/Transforms/JumpThreading/thread-two-bbs.ll
Log Message:
-----------
[ConstantFold] allow folding icmp of null and constexpr
I noticed that we were not folding expressions like this:
icmp ult (constexpr), null
in https://llvm.org/PR49355, so we end up with extremely large
icmp instructions as the constant expressions pile up on each other.
There is no potential to mis-fold an unsigned boundary condition
with a zero/null, so this is just falling through a crack in the
pattern matching.
The more general case of comparisons of non-zero constants and
constexpr are more tricky and may require the datalayout to know
how to cast to different types, etc. Negative tests verify that
we are only changing a subset of potential patterns.
Differential Revision: https://reviews.llvm.org/D98150
Compare: https://github.com/llvm/llvm-project/compare/b9f169fb7dcd...f75b5305f4de
More information about the All-commits
mailing list