This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Add the missing InstrAliasing for 64-bit rotate instructions
ClosedPublic

Authored by steven.zhang on Jan 13 2020, 7:41 PM.

Details

Summary

We have the InstAlias rules for 32-bit rotate but missing the 64-bit one.

Rotate left immediate rotlwi ra,rs,n rlwinm ra,rs,n,0,31
Rotate left rotlw ra,rs,rb rlwnm ra,rs,rb,0,31

Diff Detail

Event Timeline

steven.zhang created this revision.Jan 13 2020, 7:41 PM

Unit tests: fail. 61798 tests passed, 1 failed and 781 were skipped.

failed: libc++.std/thread/thread_threads/thread_thread_this/sleep_until.pass.cpp

clang-tidy: unknown.

clang-format: pass.

Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

steven.zhang retitled this revision from [PowerPC] Add the missing InstrAliasing for 64-bit rotate and cntlz instructions to [PowerPC] Add the missing InstrAliasing for 64-bit rotate instructions.
steven.zhang edited the summary of this revision. (Show Details)

Only alias the safe one.

steven.zhang set the repository for this revision to rG LLVM Github Monorepo.Jan 13 2020, 9:24 PM

Unit tests: pass. 61801 tests passed, 0 failed and 781 were skipped.

clang-tidy: unknown.

clang-format: pass.

Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

jsji added a comment.Feb 12 2020, 7:37 PM

Good catch. This looks good to me. However, there are more than these, almost ALL 64 bits OPs are missing InstAlias.. Can we get some general way to support ALL of them, instead of fixing one by one like this?

Good catch. This looks good to me. However, there are more than these, almost ALL 64 bits OPs are missing InstAlias.. Can we get some general way to support ALL of them, instead of fixing one by one like this?

PowerPC separate the 32bit and 64bit instructions into two files, as we didn't have the general way to define the instructions for 32bit/64bit, it is NOT easy to do it for instr alias also. Maybe, it could be a follow up of this patch ?

jsji accepted this revision as: jsji.Feb 13 2020, 6:48 AM

Fine for me, as long as you DO follow up to solve the problem for ALL 64 bit instructions.

This revision is now accepted and ready to land.Feb 13 2020, 6:48 AM
This revision was automatically updated to reflect the committed changes.