[llvm] [AArch64] Drop poison-generating flags in `genSubAdd2SubSub` combiner (PR #90028)

David Green via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 25 02:30:42 PDT 2024


https://github.com/davemgreen commented:

Thanks for putting the patch together.

I think the flags were being added by https://github.com/llvm/llvm-project/blob/fe47e8ff3ae7fc8975eaade6bfa6679737c28b93/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp#L7880? If this patch clears the flags on root then they will no longer be set on the new instructions, which is what we want.

It might be worth having the switch at https://github.com/llvm/llvm-project/blob/fe47e8ff3ae7fc8975eaade6bfa6679737c28b93/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp#L6969 return as opposed to break, so that we don't run the code that is intended for mul+add. Either way this looks correct now, but it would mean that this code doesn't need to modify Root.

https://github.com/llvm/llvm-project/pull/90028


More information about the llvm-commits mailing list