[llvm] [VPlan] Preserve trunc nuw/nsw in VPRecipeWithIRFlags (PR #144700)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 19 07:03:58 PDT 2025
================
@@ -595,7 +595,7 @@ class VPSingleDefRecipe : public VPRecipeBase, public VPValue {
class VPIRFlags {
enum class OperationType : unsigned char {
Cmp,
- OverflowingBinOp,
+ WrappingOp,
----------------
lukel97 wrote:
Yeah that crossed my mind too, I've added it in [0a7258a](https://github.com/llvm/llvm-project/pull/144700/commits/0a7258aabb95a811e450e97308d9e32c905b326b) and it seems to work well.
My only concern was the `VPWidenRecipe(unsigned VPDefOpcode, unsigned Opcode, ArrayRef<VPValue *> Operands, bool NUW, bool NSW, DebugLoc DL)` constructor but I think the `VPIRFlags::flagsValidForOpcode` check should catch any cases where a trunc opcode is passed into it.
https://github.com/llvm/llvm-project/pull/144700
More information about the llvm-commits
mailing list