[llvm] [Xtensa] Implement lowering SELECT_CC, SETCC. (PR #97017)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 28 02:17:33 PDT 2024
================
@@ -90,6 +90,26 @@ XtensaTargetLowering::XtensaTargetLowering(const TargetMachine &TM,
setOperationAction(ISD::BR_CC, MVT::i64, Expand);
setOperationAction(ISD::BR_CC, MVT::f32, Expand);
+ // Used by legalize types to correctly generate the setcc result.
+ // AddPromotedToType(ISD::SETCC, MVT::i1, MVT::i32);
+ setOperationPromotedToType(ISD::SETCC, MVT::i1, MVT::i32);
+ setOperationPromotedToType(ISD::BR_CC, MVT::i1, MVT::i32);
+
+ setOperationAction(ISD::BR_CC, MVT::i32, Legal);
+ setOperationAction(ISD::BR_CC, MVT::i64, Expand);
+
+ setOperationAction(ISD::SELECT, MVT::i32, Expand);
+ setOperationAction(ISD::SELECT, MVT::i64, Expand);
+
+ setOperationAction(ISD::SELECT_CC, MVT::i32, Custom);
+ setOperationAction(ISD::SELECT_CC, MVT::i64, Expand);
+
+ setOperationAction(ISD::SETCC, MVT::i32, Custom);
+ setOperationAction(ISD::SETCC, MVT::i64, Expand);
+
+ // make BRCOND legal, its actually only legal for a subset of conds
----------------
arsenm wrote:
This would be covered by setCondCodeAction, which isn't used here?
https://github.com/llvm/llvm-project/pull/97017
More information about the llvm-commits
mailing list