Changes in directory llvm/tools/llvm-upgrade:
UpgradeParser.y updated: 1.21 -> 1.22 --- Log message: Create an option to turn off generation of fcmp instructions while still allowing integer setxx instructions to be converted to icmp. --- Diffs of the changes: (+9 -0) UpgradeParser.y | 9 +++++++++ 1 files changed, 9 insertions(+) Index: llvm/tools/llvm-upgrade/UpgradeParser.y diff -u llvm/tools/llvm-upgrade/UpgradeParser.y:1.21 llvm/tools/llvm-upgrade/UpgradeParser.y:1.22 --- llvm/tools/llvm-upgrade/UpgradeParser.y:1.21 Wed Dec 6 04:57:33 2006 +++ llvm/tools/llvm-upgrade/UpgradeParser.y Wed Dec 6 22:22:23 2006 @@ -24,6 +24,7 @@ #define YYINCLUDED_STDLIB_H #define YYDEBUG 1 #define UPGRADE_SETCOND_OPS 0 +#define GENERATE_FCMP_INSTS 0 int yylex(); // declaration" of xxx warnings. int yyparse(); @@ -247,8 +248,16 @@ result[6] = cc1; result[7] = cc2; if (TI.isFloatingPoint()) { +#if GENERATE_FCMP_INSTS result[0] = 'f'; result[5] = 'o'; // FIXME: Always map to ordered comparison ? + if (cc1 == 'n') + result[5] = 'u'; // NE maps to unordered + else + result[5] = 'o'; // everything else maps to ordered +#else + result = setcc; +#endif } else if (TI.isIntegral() || TI.isPointer()) { result[0] = 'i'; if ((cc1 == 'e' && cc2 == 'q') || (cc1 == 'n' && cc2 == 'e')) _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits