[PATCH] D94211: [NFC][PowerPC] Format and clean the logic for setOperationActions to make it easier to maintain

Qiu Chaofan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 14 08:11:08 PST 2021


qiucf added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:330
 
-  // PowerPC does not have ROTR
-  setOperationAction(ISD::ROTR, MVT::i32   , Expand);
-  setOperationAction(ISD::ROTR, MVT::i64   , Expand);
+  setOperationAction(ISD::STRICT_FP_ROUND,   MVT::f32, Legal);
 
----------------
steven.zhang wrote:
> qiucf wrote:
> > steven.zhang wrote:
> > > Do we miss the case for setOperationAction(ISD::STRICT_FP_ROUND,   MVT::f64, Legal); ?
> > Looks yes. It's unexpectedly guarded by `P9Vector` predicate. I'll check in detail and fix it later.
> Such kind of potential issue can be easily found with this re-work.
Oh, this is expected: `setOperationAction(ISD::FP_ROUND, MVT::f64, Legal)` sets `fptrunc * to double` as legal. But that's illegal on Power8 or earlier subtargets. Anyway, its operation settings are redundant.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94211/new/

https://reviews.llvm.org/D94211



More information about the llvm-commits mailing list