This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Enable SETCCCARRY lowering for Thumb1.
ClosedPublic

Authored by efriedma on May 25 2018, 12:23 PM.

Details

Summary

We've had Thumb1 support for ARMISD::SUBE for a while now, so this just works. Reduces codesize a bit for 64-bit integer comparisons.

Diff Detail

Repository
rL LLVM

Event Timeline

efriedma created this revision.May 25 2018, 12:23 PM
efriedma updated this revision to Diff 148652.May 25 2018, 12:29 PM

Fix testcase.

rogfer01 accepted this revision.May 26 2018, 3:08 AM

Thanks @efriedma looks good to me.

test/CodeGen/ARM/wide-compares.ll
13 ↗(On Diff #148652)

I wonder if we could predicate more aggressively here and spare us that r12 (not sure if that'd be a win though)

movwlt r0, #1 
movwge r0, #2
This revision is now accepted and ready to land.May 26 2018, 3:08 AM
efriedma added inline comments.May 29 2018, 11:17 AM
test/CodeGen/ARM/wide-compares.ll
13 ↗(On Diff #148652)

This is a scheduling problem: the first mov is scheduled before the subs, so it can't clobber r0. (This should be a bit more clear if you pass -post-RA-scheduler=false to llc.)

-enable-misched=true actually "fixes" this. I think this is by chance; as far as I know, there aren't any relevant heuristics.

This revision was automatically updated to reflect the committed changes.