Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Phabricator shutdown timeline

[RISCV] Don't add -unaligned-scalar-mem to target features by default.
ClosedPublic

Authored by craig.topper on Tue, Aug 29, 3:32 PM.

Details

Summary

Only pass it +unaligned-scalar-mem/-unaligned-scalar-mem if the
user has passed one of the alignment options.

This allows us to add unaligned-scalar-mem as a feature on CPUs
that support it.

Diff Detail

Event Timeline

craig.topper created this revision.Tue, Aug 29, 3:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptTue, Aug 29, 3:33 PM
craig.topper requested review of this revision.Tue, Aug 29, 3:33 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptTue, Aug 29, 3:33 PM
wangpc added inline comments.Tue, Aug 29, 7:40 PM
llvm/lib/Target/RISCV/RISCVProcessors.td
185 ↗(On Diff #554511)

This can be tested in clang/test/Driver/riscv-cpus.c.

craig.topper added inline comments.Tue, Aug 29, 7:44 PM
llvm/lib/Target/RISCV/RISCVProcessors.td
185 ↗(On Diff #554511)

This shouldn’t be in here. That was for testing and I accidentally committed it

wangpc added inline comments.Tue, Aug 29, 8:39 PM
llvm/lib/Target/RISCV/RISCVProcessors.td
185 ↗(On Diff #554511)

Are there any processors in upstream that support unaligned memory access so that we can test it?

craig.topper planned changes to this revision.Tue, Aug 29, 9:02 PM

Remove change to sifive-x280.

wangpc accepted this revision.Wed, Aug 30, 8:57 AM

LGTM.

This revision is now accepted and ready to land.Wed, Aug 30, 8:57 AM