mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-02 07:32:52 +00:00
Correct case of m_UIToFp to m_UIToFP to match instruction name, add m_SIToFP for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187225 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d4afa8bbab
commit
3b6bb79578
@ -696,10 +696,17 @@ m_ZExt(const OpTy &Op) {
|
|||||||
/// m_UIToFP
|
/// m_UIToFP
|
||||||
template<typename OpTy>
|
template<typename OpTy>
|
||||||
inline CastClass_match<OpTy, Instruction::UIToFP>
|
inline CastClass_match<OpTy, Instruction::UIToFP>
|
||||||
m_UIToFp(const OpTy &Op) {
|
m_UIToFP(const OpTy &Op) {
|
||||||
return CastClass_match<OpTy, Instruction::UIToFP>(Op);
|
return CastClass_match<OpTy, Instruction::UIToFP>(Op);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// m_SIToFP
|
||||||
|
template<typename OpTy>
|
||||||
|
inline CastClass_match<OpTy, Instruction::SIToFP>
|
||||||
|
m_SIToFP(const OpTy &Op) {
|
||||||
|
return CastClass_match<OpTy, Instruction::SIToFP>(Op);
|
||||||
|
}
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// Matchers for unary operators
|
// Matchers for unary operators
|
||||||
//
|
//
|
||||||
|
@ -560,10 +560,10 @@ Instruction *InstCombiner::visitFMul(BinaryOperator &I) {
|
|||||||
if (I.hasNoNaNs() && I.hasNoInfs() && I.hasNoSignedZeros()) {
|
if (I.hasNoNaNs() && I.hasNoInfs() && I.hasNoSignedZeros()) {
|
||||||
Value *LHS = Op0, *RHS = Op1;
|
Value *LHS = Op0, *RHS = Op1;
|
||||||
Value *B, *C;
|
Value *B, *C;
|
||||||
if (!match(RHS, m_UIToFp(m_Value(C))))
|
if (!match(RHS, m_UIToFP(m_Value(C))))
|
||||||
std::swap(LHS, RHS);
|
std::swap(LHS, RHS);
|
||||||
|
|
||||||
if (match(RHS, m_UIToFp(m_Value(C))) && C->getType()->isIntegerTy(1)) {
|
if (match(RHS, m_UIToFP(m_Value(C))) && C->getType()->isIntegerTy(1)) {
|
||||||
B = LHS;
|
B = LHS;
|
||||||
Value *Zero = ConstantFP::getNegativeZero(B->getType());
|
Value *Zero = ConstantFP::getNegativeZero(B->getType());
|
||||||
return SelectInst::Create(C, B, Zero);
|
return SelectInst::Create(C, B, Zero);
|
||||||
@ -574,10 +574,10 @@ Instruction *InstCombiner::visitFMul(BinaryOperator &I) {
|
|||||||
if (I.hasNoNaNs() && I.hasNoInfs() && I.hasNoSignedZeros()) {
|
if (I.hasNoNaNs() && I.hasNoInfs() && I.hasNoSignedZeros()) {
|
||||||
Value *LHS = Op0, *RHS = Op1;
|
Value *LHS = Op0, *RHS = Op1;
|
||||||
Value *A, *C;
|
Value *A, *C;
|
||||||
if (!match(RHS, m_FSub(m_FPOne(), m_UIToFp(m_Value(C)))))
|
if (!match(RHS, m_FSub(m_FPOne(), m_UIToFP(m_Value(C)))))
|
||||||
std::swap(LHS, RHS);
|
std::swap(LHS, RHS);
|
||||||
|
|
||||||
if (match(RHS, m_FSub(m_FPOne(), m_UIToFp(m_Value(C)))) &&
|
if (match(RHS, m_FSub(m_FPOne(), m_UIToFP(m_Value(C)))) &&
|
||||||
C->getType()->isIntegerTy(1)) {
|
C->getType()->isIntegerTy(1)) {
|
||||||
A = LHS;
|
A = LHS;
|
||||||
Value *Zero = ConstantFP::getNegativeZero(A->getType());
|
Value *Zero = ConstantFP::getNegativeZero(A->getType());
|
||||||
|
Loading…
Reference in New Issue
Block a user