This was causing bad code gen and assembly that won't assemble, as
mixed altivec and vsx code would end up with a vsx high register
assigned to an altivec instruction, which won't work. Constraining the
classes allows the optimization to proceed.
Details
- Reviewers
hfinkel
Diff Detail
Event Timeline
lib/Target/PowerPC/PPCVSXFMAMutate.cpp | ||
---|---|---|
223 | Please specifically mention here that this can happen when there is a mixture of VSX and Altivec instructions, and we need to prevent assigning a virtual register with a VSX register class to an Altivec instruction. | |
273 | Is this a drive-by cleanup or part of the fix? If the former, please commit it separately. | |
test/CodeGen/PowerPC/fma-mutate-register-constraint.ll | ||
3 | Remove the ModuleID line. | |
93 | Remove any unnecessary metadata. |
lib/Target/PowerPC/PPCVSXFMAMutate.cpp | ||
---|---|---|
273 | It's part of the fix. I actually fixed this first, and it lead to using VR registers that didn't exist, so I had to add the constraint. |
Please specifically mention here that this can happen when there is a mixture of VSX and Altivec instructions, and we need to prevent assigning a virtual register with a VSX register class to an Altivec instruction.