out that the problem was actually the writer writing out a 'null' value
because it didn't normalize it. This fixes:
test/Regression/Assembler/2004-01-22-FloatNormalization.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10967
91177308-0d34-0410-b5e6-
96231b3b80d8
static ValueMap<double, Type, ConstantFP> FPConstants;
ConstantFP *ConstantFP::get(const Type *Ty, double V) {
+ if (Ty == Type::FloatTy) {
+ // Force the value through memory to normalize it.
+ volatile float Tmp = V;
+ V = Tmp;
+ }
return FPConstants.getOrCreate(Ty, V);
}