This is an archive of the discontinued LLVM Phabricator instance.

Target specific memory node in DAG.
ClosedPublic

Authored by delena on Dec 18 2016, 4:25 AM.

Details

Summary

I added API for creation a target specific memory node in DAG. Today, all memory nodes are common for all targets and their constructors are located in SelectionDAG.cpp.
There are some cases in X86 where we need to create a special node - truncation-with-saturation store, float-to-half-store.
In the current patch I added truncation-with-saturation nodes and I'm using them for intrinsics. In the future I plan to implement DAG lowering for truncation-with-saturation pattern.

Diff Detail

Repository
rL LLVM

Event Timeline

delena updated this revision to Diff 81878.Dec 18 2016, 4:25 AM
delena retitled this revision from to Target specific memory node in DAG..
delena updated this object.
delena added reviewers: craig.topper, igorb, RKSimon.
delena set the repository for this revision to rL LLVM.
delena added a subscriber: llvm-commits.
craig.topper edited edge metadata.Dec 18 2016, 6:00 PM

Does this patch remove the existing patterns for these intrinsics?

../lib/Target/X86/X86ISelLowering.cpp
19704

Variable names should be capitalized.

Does this patch remove the existing patterns for these intrinsics?

Yes. The patterns were in X86InstAVX512.td. We put them in because we did not have any other solution. Now I removed them all.

But how does the patch remove them. From what I can see those patterns are created in avx512_trunc_mr_lowering, and it looks like that's still instantiated for these classes.

delena marked an inline comment as done.Dec 18 2016, 11:02 PM

Oh, I forgot to remove avx512_trunc_sat_mr_lowering, these patterns are not in use any more. The avx512_trunc_mr_lowering does the work - replaces "store" with "mr" instruction.
Updating the patch.. Thank you for catching this.

delena updated this revision to Diff 81918.Dec 18 2016, 11:04 PM
delena edited edge metadata.

Removing avx512_trunc_sat_mr_lowering patterns, they are not in use any more.

This revision was automatically updated to reflect the committed changes.