This is an archive of the discontinued LLVM Phabricator instance.

[TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (Baseline Tests)
ClosedPublic

Authored by joanlluch on Oct 17 2019, 4:12 AM.

Diff Detail

Event Timeline

joanlluch created this revision.Oct 17 2019, 4:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 17 2019, 4:12 AM
spatel added inline comments.Oct 17 2019, 5:05 AM
llvm/test/CodeGen/MSP430/shift-amount-threshold.ll
4–5

I'm not sure if there's a difference, but I usually specify the triple in the RUN line, and I don't explicitly set a datalayout.

7

Here and below: remove unnecessary "dso_local"

161

Is it intentional that all tests use the i16 type? Would it be beneficial/increase test coverage to include other common types like i32/i64?

joanlluch marked 2 inline comments as done.Oct 17 2019, 5:58 AM
joanlluch added inline comments.
llvm/test/CodeGen/MSP430/shift-amount-threshold.ll
4–5

I think there's no difference. I just followed the pattern found in other tests of the same target such as the shifts.ll. Also, the form that I used is what clang generates, so I thought it would be more representative. But I can replace it if considered not suitable.

7

I'm unsure about what dsl_local means, this was generated by clang, but I'll remove it if not necessary.

161

Yes, the i16 type is intentional. The target does not natively support larger types, so larger types are expanded into operations with register pairs requiring additional transformations, or are custom lowered, which confuse the purposes of this patch.

joanlluch updated this revision to Diff 225424.Oct 17 2019, 7:08 AM

Updated baseline test file with the given recommendations:

  • removed explicit target and datalayout from .ll test file
  • removed dso_local
spatel accepted this revision.Oct 17 2019, 7:09 AM

LGTM

llvm/test/CodeGen/MSP430/shift-amount-threshold.ll
7

For our needs within this file, I think it's just noise:
http://llvm.org/docs/LangRef.html#runtime-preemption-specifiers

This revision is now accepted and ready to land.Oct 17 2019, 7:09 AM
joanlluch planned changes to this revision.Oct 17 2019, 7:34 AM

@spatel
I just realised that I somehow messed this test file with the already optimised one. Please discard this until I upload the right one. Thanks

joanlluch updated this revision to Diff 225444.Oct 17 2019, 8:46 AM

Should be ok now.

This revision is now accepted and ready to land.Oct 17 2019, 8:46 AM
This revision was automatically updated to reflect the committed changes.