[PATCH] D149033: [NFC]Fix 2 logic dead code
Wang, Xin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 28 00:03:40 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9c1e4ee6902a: [NFC]Fix 2 logic dead code (authored by XinWang10).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149033/new/
https://reviews.llvm.org/D149033
Files:
llvm/lib/CodeGen/CodeGenPrepare.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -5451,7 +5451,7 @@
// it's beneficial on the target, otherwise we end up lowering to a call to
// __powidf2 (for example).
if (ConstantSDNode *RHSC = dyn_cast<ConstantSDNode>(RHS)) {
- unsigned Val = RHSC->getSExtValue();
+ int Val = RHSC->getSExtValue();
// powi(x, 0) -> 1.0
if (Val == 0)
@@ -5460,7 +5460,7 @@
if (DAG.getTargetLoweringInfo().isBeneficialToExpandPowI(
Val, DAG.shouldOptForSize())) {
// Get the exponent as a positive value.
- if ((int)Val < 0)
+ if (Val < 0)
Val = -Val;
// We use the simple binary decomposition method to generate the multiply
// sequence. There are more optimal ways to do this (for example,
Index: llvm/lib/CodeGen/CodeGenPrepare.cpp
===================================================================
--- llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -6888,9 +6888,7 @@
return false;
TargetLowering::SelectSupportKind SelectKind;
- if (VectorCond)
- SelectKind = TargetLowering::VectorMaskSelect;
- else if (SI->getType()->isVectorTy())
+ if (SI->getType()->isVectorTy())
SelectKind = TargetLowering::ScalarCondVectorVal;
else
SelectKind = TargetLowering::ScalarValSelect;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149033.517820.patch
Type: text/x-patch
Size: 1510 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230428/6ec1fa50/attachment.bin>
More information about the llvm-commits
mailing list