diff options
| author | Reid Spencer <rspencer@reidspencer.com> | 2006-12-07 04:22:23 +0000 |
|---|---|---|
| committer | Reid Spencer <rspencer@reidspencer.com> | 2006-12-07 04:22:23 +0000 |
| commit | fc9ca55b6a4a7afb4281ee8da52209e3655b9e50 (patch) | |
| tree | 94fd31b69288f67acb1073a787923f55a9fce9da | |
| parent | bee13066345b02ac4bf99e2f930b25e24cc8adeb (diff) | |
| download | bcm5719-llvm-fc9ca55b6a4a7afb4281ee8da52209e3655b9e50.tar.gz bcm5719-llvm-fc9ca55b6a4a7afb4281ee8da52209e3655b9e50.zip | |
Create an option to turn off generation of fcmp instructions while still
allowing integer setxx instructions to be converted to icmp.
llvm-svn: 32302
| -rw-r--r-- | llvm/tools/llvm-upgrade/UpgradeParser.y | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/tools/llvm-upgrade/UpgradeParser.y b/llvm/tools/llvm-upgrade/UpgradeParser.y index 1ee394c8272..f53369d6031 100644 --- a/llvm/tools/llvm-upgrade/UpgradeParser.y +++ b/llvm/tools/llvm-upgrade/UpgradeParser.y @@ -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 @@ getCompareOp(const std::string& setcc, const TypeInfo& TI) { 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')) |

