Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This patch has no description summary at all :( What's the background to this? Is it related to PR51346 / D74436?
I'm sorry about that. I believe @arsenm would know the background to this. If I understood the issue raised by @arsenm correctly, we need DAG-combine APIs to not just check for fp-model specific flags, but to have finer SDNode level checks. The new test in AMDGPU/fma.ll is an example I could think of as a motivation for this.
This is migrating to using the instruction granularity fast math flags instead of the function level fast math attributes, it's unrelated to PR51346
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
13028–13030 | I swear we had a utility for this already somewhere | |
llvm/test/CodeGen/AMDGPU/fma.ll | ||
149 | Probably should add check lines for the other targets, and add a comment describing the test |
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
13028–13030 | I couldn't find it :( |
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
13075–13079 | I think this is the existing code that we're remembering. This seems to be pulling in one more clause for FMA/FMAD - probably want to do that too for this patch? | |
llvm/test/CodeGen/X86/fma-scalar-combine.ll | ||
567 | Not sure if you manually created these check lines or removed the CHECK for a 'ret' line, but it's better to leave that in for easier updating. If you can pre-commit this test with the current (baseline) CHECKs, that would be even better. |
Rebased; Addressed review comments.
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
13075–13079 | Oh, I thought we were talking about hasNoInfs(), the isContractibleFMUL() is copied from this lambda-expression. I removed the dependence on HasFMAD since it's checking if a target supports FMAD. HasFMA does the same for FMA. I feel isContractibleFMUL() should strictly check for FP-environment and not worry about target specific details. |
I don't have a commit access. @arsenm, can you commit this on my behalf? Here are my details:
user.name=Abinav Puthan Purayil
user.email=abinav.puthanpurayil@amd.com
I swear we had a utility for this already somewhere