[llvm] [NVPTX][SelectionDAG] Add IMAD combine rules + infra to disable default SelectionDAG rules for testing (PR #121724)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 5 21:05:27 PST 2025


================
@@ -153,6 +153,13 @@ static cl::opt<bool> EnableVectorFCopySignExtendRound(
     "combiner-vector-fcopysign-extend-round", cl::Hidden, cl::init(false),
     cl::desc(
         "Enable merging extends and rounds into FCOPYSIGN on vector types"));
+
+static cl::opt<bool>
----------------
arsenm wrote:

DAG combines like this are most useful for patterns that appear mid-legalization, which presumably is how you encountered this in the first place. Should have tests with that scenario. 

If you have something you know will lower to a constant (e.g certain global addresses), you can test semi-directly that way. Plus vectors are less likely to pre-simplify 

https://github.com/llvm/llvm-project/pull/121724


More information about the llvm-commits mailing list