Also look for per-component fnegs.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp | ||
---|---|---|
3473 | SmallVector is overkill, just use int Mask[2]? Or std::array if you want more type safety. |
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp | ||
---|---|---|
3341 | Return OutSrc, or NoRegister on failure? | |
3359–3360 | This seems redundant. | |
3412 | Could return a std::pair of Registers, or {NoRegister,NoRegister} on failure. But I'm not sure if that would be cleaner. | |
3416 | Assert that we're looking at a G_BITCAST before doing this. |
Addressed comments.
Functions return register value instead of using argument to return value.
Fix bug with illegally stripping FNeg instructions that are not of type 2x16 or size 16.
Added mir tests.
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp | ||
---|---|---|
3326 | Nit: "xor it with what??". How about "flip the value" instead? | |
3331 | Everywhere that you use getVRegDef, do you also potentially need to look through copies as well? | |
3382 | Just use Register() instead of MCRegister::NoRegister. Same in a few other places below. | |
3433 | Is there a chance that the G_AND would already have been optimized away, e.g. if Lo was a constant or was otherwise known not to have any high bits set? |
Nit: "xor it with what??". How about "flip the value" instead?