ISel Pattern Preferences

What's a reliable way to prefer one patterns over another? I have two
patterns with different predicates. Pattern A has a very general predicate
to catch a wide variety of store instructions. Pattern B has a narrower
predicate meant to catch very specific store instructions that would also
satisfy the predicate for Pattern A.

We used to match Pattern B just fine but after changing .td files a bit the
selector is always picking Pattern A.

Setting AddedComplexity doesn't seem to help.

                                                -Dave

Urk. I set AddedComplexity on the wrong thing. Seems to work now.

                                                -Dave

David,

Would you mind documenting what you did with AddedComplexity for the ‘less fortunate’ on the wiki?

Thanks,
Justin.

Yep. Will do. Hmm...is there a link to the Wiki on the main page? I can't
find it.

                                         -Dave

Not yet.

http://wiki.llvm.org

I added a link to the sidebar.

-Chris

Thanks Chris!

Can we put it in the IRC channel’s topic as well?

Sure, talk to an op there :slight_smile: