Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
| llvm/test/CodeGen/AMDGPU/GlobalISel/mul-known-bits.i64.ll | ||
|---|---|---|
| 53 | @tsymalla suggested in my revision to give the test cases more descriptive names. | |
| 258 | This is a neat approach! Is there a possibility to extend this to G_MAD instructions as well? It's trickier since the operands don't have the same indices as for G_MUL etc. though. | |
| 312 | G_MAD does not take advantage of the binop_right_to_zero rule. | |
| 386 | ||
| 432 | ||
LGTM
| llvm/include/llvm/Target/GlobalISel/Combine.td | ||
|---|---|---|
| 349 | This looks alright to me, but what is the point in swapping the operands if both of them are constants except making the ISA more readable? s_add_i32 s1, 0x1000, 0 => s_add_i32 s1, 0, 0x1000 | |
| llvm/test/CodeGen/AMDGPU/GlobalISel/mul-known-bits.i64.ll | ||
| 174 | Shouldn't this one be eliminated? | |
| llvm/include/llvm/Target/GlobalISel/Combine.td | ||
|---|---|---|
| 349 | If both operands are constants then all the opcodes will be constant-folded. | |
| llvm/test/CodeGen/AMDGPU/GlobalISel/mul-known-bits.i64.ll | ||
| 53 | That's fine but I think it should be a separate patch. | |
| 174 | Why? It's used by the global_store below. | |
| 258 | There are no generic G_MAD instructions, so I think we would need to add a target-specific combine for target-specific opcodes. | |
| 312 | Likewise, I think that would need to be a target-specific combine. | |
| llvm/test/CodeGen/AMDGPU/GlobalISel/mul-known-bits.i64.ll | ||
|---|---|---|
| 174 | Missed that one. | |
Should also get compares, but that's trickier since you have to swap the predicate