This is an archive of the discontinued LLVM Phabricator instance.

ARM: Fix codegen for rbit intrinsic
ClosedPublic

Authored by kongyi on Aug 20 2014, 2:00 AM.

Details

Summary

LLVM generates illegal rbit r0, #352 instruction for llvm.arm.rbit intrinsic. According to ARMARM, rbit only takes register as argument, not immediate. The correct instruction should be rbit <Rd>, <Rm>.

The bug was introduced by r211057.

Diff Detail

Repository
rL LLVM

Event Timeline

kongyi updated this revision to Diff 12693.Aug 20 2014, 2:00 AM
kongyi retitled this revision from to ARM: Fix codegen for rbit intrinsic.
kongyi updated this object.
kongyi edited the test plan for this revision. (Show Details)
kongyi added reviewers: grosbach, rengolin.
kongyi set the repository for this revision to rL LLVM.
kongyi added a subscriber: Unknown Object (MLST).

Hi Yi,

Looks like an obvious change, but could you add/modify a test where the input argument actually *is* a constant integer? (It should still be fine because it's a Constant rather than a TargetConstant in the DAG, but it's as well to have it tested).

You can just commit with that adjustment.

Cheers.

Tim.

kongyi closed this revision.Aug 20 2014, 3:49 AM
kongyi updated this revision to Diff 12696.

Closed by commit rL216064 (authored by @kongyi).