[llvm-commits] CVS: llvm/lib/CodeGen/IntrinsicLowering.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Mon Feb 28 18:08:09 PST 2005
Changes in directory llvm/lib/CodeGen:
IntrinsicLowering.cpp updated: 1.22 -> 1.23
---
Log message:
Lower llvm.isunordered(a, b) into a != a | b != b.
---
Diffs of the changes: (+8 -3)
IntrinsicLowering.cpp | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
Index: llvm/lib/CodeGen/IntrinsicLowering.cpp
diff -u llvm/lib/CodeGen/IntrinsicLowering.cpp:1.22 llvm/lib/CodeGen/IntrinsicLowering.cpp:1.23
--- llvm/lib/CodeGen/IntrinsicLowering.cpp:1.22 Mon Feb 28 13:27:23 2005
+++ llvm/lib/CodeGen/IntrinsicLowering.cpp Mon Feb 28 20:07:58 2005
@@ -206,9 +206,14 @@
break;
}
case Intrinsic::isunordered: {
- static Function *isunorderedFCache = 0;
- ReplaceCallWith("isunordered", CI, CI->op_begin()+1, CI->op_end(),
- Type::BoolTy, isunorderedFCache);
+ Value *L = CI->getOperand(1);
+ Value *R = CI->getOperand(2);
+
+ Value *LIsNan = new SetCondInst(Instruction::SetNE, L, L, "LIsNan", CI);
+ Value *RIsNan = new SetCondInst(Instruction::SetNE, R, R, "RIsNan", CI);
+ CI->replaceAllUsesWith(
+ BinaryOperator::create(Instruction::Or, LIsNan, RIsNan,
+ "isunordered", CI));
break;
}
}
More information about the llvm-commits
mailing list