[llvm] Fix [PowerPC] llc crashed at -O1/O2/O3: Assertion `isImm() && "Wrong MachineOperand mutator"' failed. (PR #170548)
zhijian lin via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 5 13:01:55 PST 2025
diggerlin wrote:
> May I suggest we put that block of code into a static function that takes 2 params, SrcOpNum and SplatImmNum. Then we just call the function with the proper params for the 3 splat instructions. I feel that would make he code more readable.
Since `PPCMIPeephole::simplifyCode()` is a large function, using a static function would require the reader to jump to a much larger scope. Because the block of code you asked me to modify is small, I think using a lambda function makes the code more readable.
https://github.com/llvm/llvm-project/pull/170548
More information about the llvm-commits
mailing list