[all-commits] [llvm/llvm-project] 553723: [InstSimplify] Fix a scalable-vector crash
Fraser Cormack via All-commits
all-commits at lists.llvm.org
Wed Jun 28 09:11:14 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 55372309a4c757af17f7dc33e5b686cf8565997f
https://github.com/llvm/llvm-project/commit/55372309a4c757af17f7dc33e5b686cf8565997f
Author: Fraser Cormack <fraser at codeplay.com>
Date: 2023-06-28 (Wed, 28 Jun 2023)
Changed paths:
M llvm/lib/Analysis/InstructionSimplify.cpp
M llvm/test/Transforms/InstSimplify/fp-nan.ll
Log Message:
-----------
[InstSimplify] Fix a scalable-vector crash
D143505 fixed/simplified folding of operations with SNaN operands. In
doing so it introduced a crash when handling scalable vector types,
wherein the scalable-vector ConstantVector was cast to a ConstantFP.
Since we know by that point in the code that if we've found a NaN, we're
dealing with a scalable-vector splat (as there are no other kinds of
scalable-vector constant for which that holds), we can grab the splatted
value and re-use the existing code, which will automatically splat the
new NaN back to a scalable vector for us.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D153566
More information about the All-commits
mailing list