[PATCH] D16635: Fix PR #12906: printing of floating-point constants on non-C locales

Antoine Pitrou via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 27 09:39:04 PST 2016


pitrou created this revision.
pitrou added a subscriber: llvm-commits.
Herald added a reviewer: tstellarAMD.
Herald added subscribers: dsanders, jyknight, jfb, qcolombet, MatzeB, jholewinski.

Replace the libc-based printing with calling out to APFloat.toString().
Unfortunately the representation format is slightly different, which produces a lot of churn in the test suite.

http://reviews.llvm.org/D16635

Files:
  lib/IR/AsmWriter.cpp
  test/Analysis/BasicAA/full-store-partial-alias.ll
  test/Analysis/BasicAA/phi-and-select.ll
  test/Analysis/BasicAA/phi-spec-order.ll
  test/Analysis/BranchProbabilityInfo/pr22718.ll
  test/Analysis/CFLAliasAnalysis/full-store-partial-alias.ll
  test/Analysis/Delinearization/himeno_1.ll
  test/Analysis/Delinearization/himeno_2.ll
  test/Analysis/Delinearization/multidim_ivs_and_integer_offsets_nts_3d.ll
  test/Analysis/Delinearization/multidim_only_ivs_2d_nested.ll
  test/Analysis/DependenceAnalysis/Invariant.ll
  test/Analysis/GlobalsModRef/chaining-analysis.ll
  test/Analysis/ScalarEvolution/nsw-offset-assume.ll
  test/Analysis/ScalarEvolution/nsw-offset.ll
  test/Analysis/ScalarEvolution/nsw.ll
  test/Analysis/ScalarEvolution/sext-iv-0.ll
  test/Analysis/ScalarEvolution/sext-iv-1.ll
  test/Analysis/ScalarEvolution/sle.ll
  test/Analysis/ScalarEvolution/trip-count4.ll
  test/Analysis/ScalarEvolution/trip-count5.ll
  test/Analysis/TypeBasedAliasAnalysis/licm.ll
  test/Assembler/2002-04-07-HexFloatConstants.ll
  test/Assembler/2002-04-07-InfConstant.ll
  test/Assembler/2004-02-01-NegativeZero.ll
  test/Assembler/2004-02-27-SelfUseAssertError.ll
  test/Assembler/insertextractvalue.ll
  test/Assembler/unnamed.ll
  test/Bitcode/compatibility-3.6.ll
  test/Bitcode/compatibility-3.7.ll
  test/Bitcode/compatibility.ll
  test/Bitcode/constantsTest.3.2.ll
  test/Bitcode/operand-bundles.ll
  test/Bitcode/select.ll
  test/Bitcode/upgrade-tbaa.ll
  test/CodeGen/AArch64/PBQP-csr.ll
  test/CodeGen/AArch64/aarch64-a57-fp-load-balancing.ll
  test/CodeGen/AArch64/aarch64-address-type-promotion-assertion.ll
  test/CodeGen/AArch64/arm64-2011-03-09-CPSRSpill.ll
  test/CodeGen/AArch64/arm64-2012-06-06-FPToUI.ll
  test/CodeGen/AArch64/arm64-2013-01-23-frem-crash.ll
  test/CodeGen/AArch64/arm64-abi.ll
  test/CodeGen/AArch64/arm64-ccmp.ll
  test/CodeGen/AArch64/arm64-dead-register-def-bug.ll
  test/CodeGen/AArch64/arm64-fast-isel-fcmp.ll
  test/CodeGen/AArch64/arm64-fast-isel-materialize.ll
  test/CodeGen/AArch64/arm64-fcmp-opt.ll
  test/CodeGen/AArch64/arm64-fcopysign.ll
  test/CodeGen/AArch64/arm64-fmadd.ll
  test/CodeGen/AArch64/arm64-fmax-safe.ll
  test/CodeGen/AArch64/arm64-fmax.ll
  test/CodeGen/AArch64/arm64-fp-contract-zero.ll
  test/CodeGen/AArch64/arm64-misched-basic-A53.ll
  test/CodeGen/AArch64/arm64-neon-2velem-high.ll
  test/CodeGen/AArch64/arm64-neon-2velem.ll
  test/CodeGen/AArch64/arm64-neon-add-sub.ll
  test/CodeGen/AArch64/arm64-neon-copy.ll
  test/CodeGen/AArch64/arm64-nvcast.ll
  test/CodeGen/AArch64/arm64-rev.ll
  test/CodeGen/AArch64/arm64-vector-insertion.ll
  test/CodeGen/AArch64/arm64-vmul.ll
  test/CodeGen/AArch64/arm64-zero-cycle-zeroing.ll
  test/CodeGen/AArch64/combine-comparisons-by-cse.ll
  test/CodeGen/AArch64/emutls.ll
  test/CodeGen/AArch64/fcvt_combine.ll
  test/CodeGen/AArch64/postra-mi-sched.ll
  test/CodeGen/AArch64/remat-float0.ll
  test/CodeGen/AArch64/tail-call.ll
  test/CodeGen/AMDGPU/big_alu.ll
  test/CodeGen/AMDGPU/commute-shifts.ll
  test/CodeGen/AMDGPU/commute_modifiers.ll
  test/CodeGen/AMDGPU/cvt_flr_i32_f32.ll
  test/CodeGen/AMDGPU/cvt_rpi_i32_f32.ll
  test/CodeGen/AMDGPU/ds-negative-offset-addressing-mode-loop.ll
  test/CodeGen/AMDGPU/fcmp-cnd.ll
  test/CodeGen/AMDGPU/fcmp-cnde-int-args.ll
  test/CodeGen/AMDGPU/fconst64.ll
  test/CodeGen/AMDGPU/fmuladd.ll
  test/CodeGen/AMDGPU/fneg-fabs.f64.ll
  test/CodeGen/AMDGPU/fneg-fabs.ll
  test/CodeGen/AMDGPU/fneg.f64.ll
  test/CodeGen/AMDGPU/fneg.ll
  test/CodeGen/AMDGPU/fp-classify.ll
  test/CodeGen/AMDGPU/input-mods.ll
  test/CodeGen/AMDGPU/insert_vector_elt.ll
  test/CodeGen/AMDGPU/jump-address.ll
  test/CodeGen/AMDGPU/kcache-fold.ll
  test/CodeGen/AMDGPU/llvm.AMDGPU.cube.ll
  test/CodeGen/AMDGPU/llvm.AMDGPU.kill.ll
  test/CodeGen/AMDGPU/llvm.SI.fs.interp.ll
  test/CodeGen/AMDGPU/llvm.amdgpu.kilp.ll
  test/CodeGen/AMDGPU/llvm.sqrt.ll
  test/CodeGen/AMDGPU/load-input-fold.ll
  test/CodeGen/AMDGPU/mad-sub.ll
  test/CodeGen/AMDGPU/madmk.ll
  test/CodeGen/AMDGPU/or.ll
  test/CodeGen/AMDGPU/predicate-dp4.ll
  test/CodeGen/AMDGPU/pv.ll
  test/CodeGen/AMDGPU/r600-export-fix.ll
  test/CodeGen/AMDGPU/r600-infinite-loop-bug-while-reorganizing-vector.ll
  test/CodeGen/AMDGPU/r600cfg.ll
  test/CodeGen/AMDGPU/schedule-fs-loop-nested-if.ll
  test/CodeGen/AMDGPU/schedule-fs-loop-nested.ll
  test/CodeGen/AMDGPU/schedule-fs-loop.ll
  test/CodeGen/AMDGPU/schedule-if-2.ll
  test/CodeGen/AMDGPU/schedule-if.ll
  test/CodeGen/AMDGPU/schedule-vs-if-nested-loop-failure.ll
  test/CodeGen/AMDGPU/schedule-vs-if-nested-loop.ll
  test/CodeGen/AMDGPU/selectcc-opt.ll
  test/CodeGen/AMDGPU/set-dx10.ll
  test/CodeGen/AMDGPU/setcc.ll
  test/CodeGen/AMDGPU/seto.ll
  test/CodeGen/AMDGPU/setuo.ll
  test/CodeGen/AMDGPU/sgpr-copy.ll
  test/CodeGen/AMDGPU/si-sgpr-spill.ll
  test/CodeGen/AMDGPU/si-spill-cf.ll
  test/CodeGen/AMDGPU/store.ll
  test/CodeGen/AMDGPU/subreg-coalescer-crash.ll
  test/CodeGen/AMDGPU/swizzle-export.ll
  test/CodeGen/AMDGPU/unsupported-cc.ll
  test/CodeGen/AMDGPU/vgpr-spill-emergency-stack-slot-compute.ll
  test/CodeGen/AMDGPU/vgpr-spill-emergency-stack-slot.ll
  test/CodeGen/AMDGPU/vop-shrink.ll
  test/CodeGen/AMDGPU/xor.ll
  test/CodeGen/ARM/2007-01-19-InfiniteLoop.ll
  test/CodeGen/ARM/2008-04-04-ScavengerAssert.ll
  test/CodeGen/ARM/2009-02-27-SpillerBug.ll
  test/CodeGen/ARM/2009-03-07-SpillerBug.ll
  test/CodeGen/ARM/2009-04-08-FREM.ll
  test/CodeGen/ARM/2009-04-08-FloatUndef.ll
  test/CodeGen/ARM/2009-06-19-RegScavengerAssert.ll
  test/CodeGen/ARM/2009-06-30-RegScavengerAssert.ll
  test/CodeGen/ARM/2009-07-18-RewriterBug.ll
  test/CodeGen/ARM/2009-07-29-VFP3Registers.ll
  test/CodeGen/ARM/2009-08-21-PostRAKill.ll
  test/CodeGen/ARM/2009-08-21-PostRAKill3.ll
  test/CodeGen/ARM/2009-08-29-ExtractEltf32.ll
  test/CodeGen/ARM/2009-08-29-TooLongSplat.ll
  test/CodeGen/ARM/2009-09-09-fpcmp-ole.ll
  test/CodeGen/ARM/2009-09-13-InvalidSubreg.ll
  test/CodeGen/ARM/2009-09-23-LiveVariablesBug.ll
  test/CodeGen/ARM/2009-09-27-CoalescerBug.ll
  test/CodeGen/ARM/2009-09-28-LdStOptiBug.ll
  test/CodeGen/ARM/2009-10-02-NEONSubregsBug.ll
  test/CodeGen/ARM/2009-10-27-double-align.ll
  test/CodeGen/ARM/2009-11-07-SubRegAsmPrinting.ll
  test/CodeGen/ARM/2009-11-13-CoalescerCrash.ll
  test/CodeGen/ARM/2009-11-13-ScavengerAssert.ll
  test/CodeGen/ARM/2009-11-13-ScavengerAssert2.ll
  test/CodeGen/ARM/2009-11-13-VRRewriterCrash.ll
  test/CodeGen/ARM/2010-04-09-NeonSelect.ll
  test/CodeGen/ARM/2010-06-21-LdStMultipleBug.ll
  test/CodeGen/ARM/2011-11-14-EarlyClobber.ll
  test/CodeGen/ARM/2012-01-23-PostRA-LICM.ll
  test/CodeGen/ARM/2012-01-24-RegSequenceLiveRange.ll
  test/CodeGen/ARM/2012-01-26-CopyPropKills.ll
  test/CodeGen/ARM/2012-02-01-CoalescerBug.ll
  test/CodeGen/ARM/2012-04-02-TwoAddrInstrCrash.ll
  test/CodeGen/ARM/2012-04-10-DAGCombine.ll
  test/CodeGen/ARM/2012-08-04-DtripleSpillReload.ll
  test/CodeGen/ARM/a15-SD-dep.ll
  test/CodeGen/ARM/apcs-vfp.ll
  test/CodeGen/ARM/arguments.ll
  test/CodeGen/ARM/arm-shrink-wrapping.ll
  test/CodeGen/ARM/avoid-cpsr-rmw.ll
  test/CodeGen/ARM/coalesce-subregs.ll
  test/CodeGen/ARM/constants.ll
  test/CodeGen/ARM/crash-greedy.ll
  test/CodeGen/ARM/cse-libcalls.ll
  test/CodeGen/ARM/debug-info-branch-folding.ll
  test/CodeGen/ARM/debug-info-d16-reg.ll
  test/CodeGen/ARM/debug-info-qreg.ll
  test/CodeGen/ARM/debug-info-s16-reg.ll
  test/CodeGen/ARM/debug-info-sreg2.ll
  test/CodeGen/ARM/fast-isel-align.ll
  test/CodeGen/ARM/fast-isel-cmp-imm.ll
  test/CodeGen/ARM/fast-isel-deadcode.ll
  test/CodeGen/ARM/fast-isel-static.ll
  test/CodeGen/ARM/fastcc-vfp.ll
  test/CodeGen/ARM/fcopysign.ll
  test/CodeGen/ARM/fnegs.ll
  test/CodeGen/ARM/fnmul.ll
  test/CodeGen/ARM/fold-stack-adjust.ll
  test/CodeGen/ARM/fp.ll
  test/CodeGen/ARM/fparith.ll
  test/CodeGen/ARM/fpcmp-f64-neon-opt.ll
  test/CodeGen/ARM/fpcmp-opt.ll
  test/CodeGen/ARM/fpcmp.ll
  test/CodeGen/ARM/fpconsts.ll
  test/CodeGen/ARM/fpmem.ll
  test/CodeGen/ARM/ifcvt10.ll
  test/CodeGen/ARM/inlineasm3.ll
  test/CodeGen/ARM/isel-v8i32-crash.ll
  test/CodeGen/ARM/load_i1_select.ll
  test/CodeGen/ARM/log2_not_readnone.ll
  test/CodeGen/ARM/mult-alt-generic-arm.ll
  test/CodeGen/ARM/neon-spfp.ll
  test/CodeGen/ARM/neon_spill.ll
  test/CodeGen/ARM/no-tail-call.ll
  test/CodeGen/ARM/out-of-registers.ll
  test/CodeGen/ARM/reg_sequence.ll
  test/CodeGen/ARM/saxpy10-a9.ll
  test/CodeGen/ARM/select.ll
  test/CodeGen/ARM/spill-q.ll
  test/CodeGen/ARM/thumb-big-stack.ll
  test/CodeGen/ARM/thumb2-size-reduction-internal-flags.ll
  test/CodeGen/ARM/twoaddrinstr.ll
  test/CodeGen/ARM/uint64tof64.ll
  test/CodeGen/ARM/v7k-libcalls.ll
  test/CodeGen/ARM/vdiv_combine.ll
  test/CodeGen/ARM/vector-promotion.ll
  test/CodeGen/ARM/vfp.ll
  test/CodeGen/ARM/vmov.ll
  test/CodeGen/ARM/vneg.ll
  test/CodeGen/ARM/vrev.ll
  test/CodeGen/ARM/widen-vmovs.ll
  test/CodeGen/Generic/2003-05-27-phifcmpd.ll
  test/CodeGen/Generic/2003-05-27-useboolinotherbb.ll
  test/CodeGen/Generic/2003-05-27-usefsubasbool.ll
  test/CodeGen/Generic/2005-01-18-SetUO-InfLoop.ll
  test/CodeGen/Generic/2005-10-21-longlonggtu.ll
  test/CodeGen/Generic/2005-12-01-Crash.ll
  test/CodeGen/Generic/2006-01-18-InvalidBranchOpcodeAssert.ll
  test/CodeGen/Generic/2006-06-12-LowerSwitchCrash.ll
  test/CodeGen/Generic/2006-07-03-schedulers.ll
  test/CodeGen/Generic/2007-05-15-InfiniteRecursion.ll
  test/CodeGen/Generic/2008-02-25-NegateZero.ll
  test/CodeGen/Generic/2008-02-26-NegatableCrash.ll
  test/CodeGen/Generic/2009-04-10-SinkCrash.ll
  test/CodeGen/Generic/badarg6.ll
  test/CodeGen/Generic/cast-fp.ll
  test/CodeGen/Generic/constindices.ll
  test/CodeGen/Generic/fneg-fabs.ll
  test/CodeGen/Generic/nested-select.ll
  test/CodeGen/Generic/print-arith-fp.ll
  test/CodeGen/Generic/select-cc.ll
  test/CodeGen/Generic/select.ll
  test/CodeGen/Generic/vector.ll
  test/CodeGen/Hexagon/convertdptoint.ll
  test/CodeGen/Hexagon/convertdptoll.ll
  test/CodeGen/Hexagon/dadd.ll
  test/CodeGen/Hexagon/dmul.ll
  test/CodeGen/Hexagon/doubleconvert-ieee-rnd-near.ll
  test/CodeGen/Hexagon/dsub.ll
  test/CodeGen/Hexagon/i16_VarArg.ll
  test/CodeGen/Hexagon/i1_VarArg.ll
  test/CodeGen/Hexagon/i8_VarArg.ll
  test/CodeGen/Hexagon/opt-fneg.ll
  test/CodeGen/Hexagon/vect/vect-fma.ll
  test/CodeGen/MIR/X86/constant-pool.mir
  test/CodeGen/MSP430/2009-05-19-DoubleSplit.ll
  (629 more files...)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16635.46146.patch
Type: text/x-patch
Size: 1683617 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160127/6866e9ac/attachment-0001.bin>


More information about the llvm-commits mailing list