Skip to content

Commit 222f3a6

Browse files
committed
Add more binops to isBinOp and isCommutativeBinOp
1 parent ef840d8 commit 222f3a6

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

llvm/include/llvm/CodeGen/TargetLowering.h

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2997,6 +2997,8 @@ class LLVM_ABI TargetLoweringBase {
29972997
case ISD::XOR:
29982998
case ISD::SADDO:
29992999
case ISD::UADDO:
3000+
case ISD::UADDO_CARRY:
3001+
case ISD::SADDO_CARRY:
30003002
case ISD::ADDC:
30013003
case ISD::ADDE:
30023004
case ISD::SADDSAT:
@@ -3016,7 +3018,8 @@ class LLVM_ABI TargetLoweringBase {
30163018
case ISD::ABDS:
30173019
case ISD::ABDU:
30183020
return true;
3019-
default: return false;
3021+
default:
3022+
return false;
30203023
}
30213024
}
30223025

@@ -3028,6 +3031,14 @@ class LLVM_ABI TargetLoweringBase {
30283031
// These are non-commutative binops.
30293032
switch (Opcode) {
30303033
case ISD::SUB:
3034+
case ISD::SUBC:
3035+
case ISD::SUBE:
3036+
case ISD::USUBO:
3037+
case ISD::SSUBO:
3038+
case ISD::USUBO_CARRY:
3039+
case ISD::SSUBO_CARRY:
3040+
case ISD::SDIVREM:
3041+
case ISD::UDIVREM:
30313042
case ISD::SHL:
30323043
case ISD::SRL:
30333044
case ISD::SRA:
@@ -3042,6 +3053,10 @@ class LLVM_ABI TargetLoweringBase {
30423053
case ISD::FSUB:
30433054
case ISD::FDIV:
30443055
case ISD::FREM:
3056+
case ISD::UCMP:
3057+
case ISD::SCMP:
3058+
case ISD::SSHLSAT:
3059+
case ISD::USHLSAT:
30453060
return true;
30463061
default:
30473062
return false;

0 commit comments

Comments
 (0)