search for: unsafefpmath

Displaying 20 results from an estimated 57 matches for "unsafefpmath".

2008 Jun 13
6
[LLVMdev] VFCmp failing when unordered or UnsafeFPMath on x86
Hi all, When trying to generate a VFCmp instruction when UnsafeFPMath is set to true I get an assert "Unexpected CondCode" on my x86 system. This also happens with UnsafeFPMath set to false and using an unordered compare. Could someone look into this? While I'm at it, is there any reason why only the most significant bit of the return value of VFCmp...
2008 Jun 13
0
[LLVMdev] VFCmp failing when unordered or UnsafeFPMath on x86
On Jun 13, 2008, at 12:27 AM, Nicolas Capens wrote: > Hi all, > > When trying to generate a VFCmp instruction when UnsafeFPMath is set > to true I get an assert “Unexpected CondCode” on my x86 system. This > also happens with UnsafeFPMath set to false and using an unordered > compare. Could someone look into this? Have you filed a bug? > > While I’m at it, is there any reason why only the most signifi...
2015 Jan 09
5
[LLVMdev] Enable changing UnsafeFPMath on a per-function basis
To continue the discussion I started last year (see the link below) on embedding command-line options in bitcode, I came up with a plan to improve the way the backend changes UnsafeFPMath on a per-function basis. The code in trunk currently resets TargetOptions::UnsafeFPMath at the beginning of SelectionDAGISel::runOnMachineFunction to enable compiling one function with “unsafe-fp-math=true” and another with “unsafe-fp-math=false”, but this won’t work if we want to parallelize the b...
2008 Jun 14
0
[LLVMdev] VFCmp failing when unordered or UnsafeFPMath on x86
On Jun 13, 2008, at 12:27 AM, Nicolas Capens wrote: > Hi all, > > When trying to generate a VFCmp instruction when UnsafeFPMath is set > to true I get an assert “Unexpected CondCode” on my x86 system. This > also happens with UnsafeFPMath set to false and using an unordered > compare. Could someone look into this? Please provide a testcase. > > While I’m at it, is there any reason why only the most si...
2008 Jun 16
1
[LLVMdev] VFCmp failing when unordered or UnsafeFPMath on x86
...nition won't break compatibility. Kind regards, Nicolas From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Chris Lattner Sent: Saturday, 14 June, 2008 02:40 To: LLVM Developers Mailing List Subject: Re: [LLVMdev] VFCmp failing when unordered or UnsafeFPMath on x86 On Jun 13, 2008, at 12:27 AM, Nicolas Capens wrote: Hi all, When trying to generate a VFCmp instruction when UnsafeFPMath is set to true I get an assert "Unexpected CondCode" on my x86 system. This also happens with UnsafeFPMath set to false and using an unordered c...
2008 Jun 16
0
[LLVMdev] VFCmp failing when unordered or UnsafeFPMath on x86
On Jun 13, 2008, at 12:27 AM, Nicolas Capens wrote: > Hi all, > > When trying to generate a VFCmp instruction when UnsafeFPMath is set > to true I get an assert “Unexpected CondCode” on my x86 system. This > also happens with UnsafeFPMath set to false and using an unordered > compare. Could someone look into this? > > While I’m at it, is there any reason why only the most significant > bit of the r...
2015 Jan 12
2
[LLVMdev] Enable changing UnsafeFPMath on a per-function basis
...gt; From: "Reid Kleckner" <rnk at google.com> > To: "Akira Hatanaka" <ahatanak at gmail.com> > Cc: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu> > Sent: Monday, January 12, 2015 2:54:48 PM > Subject: Re: [LLVMdev] Enable changing UnsafeFPMath on a per-function basis > > > > Whatever happened to tracking the safe-or-fast-ness of FP math on > instructions? Is tracking this property at a function granularity > correct? I seem to recall nobody wanted to thread this through the > SDAG. No, I think we did want to do t...
2008 Jun 17
2
[LLVMdev] VFCmp failing when unordered or UnsafeFPMath on x86
...l 0's. Or am I missing something? Thanks a lot, Nicolas From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Nate Begeman Sent: Monday, 16 June, 2008 22:43 To: LLVM Developers Mailing List Subject: Re: [LLVMdev] VFCmp failing when unordered or UnsafeFPMath on x86 On Jun 13, 2008, at 12:27 AM, Nicolas Capens wrote: Hi all, When trying to generate a VFCmp instruction when UnsafeFPMath is set to true I get an assert "Unexpected CondCode" on my x86 system. This also happens with UnsafeFPMath set to false and using an unordered c...
2015 Jan 14
3
[LLVMdev] Enable changing UnsafeFPMath on a per-function basis
...level is the right thing to do, I agree that I shouldn't proceed with my current plan. I think exposing fp flags in selection dag needs a little more work than r210467 (which exposed nsw and nuw) did. In particular, some of the targets set operation actions based on the value of TargetOptions::UnsafeFPMath (see X86TargetLowering::resetOperationActions), which means legalization has to examine the flags in addition to the opcode and type to get the operation action. On Tue, Jan 13, 2015 at 1:09 PM, Chandler Carruth <chandlerc at google.com> wrote: > > On Mon, Jan 12, 2015 at 1:18 PM, Hal...
2012 Feb 08
6
[LLVMdev] Clarifying FMA-related TargetOptions
Hello everyone, I'd like to propose the attached patch to form FMA intrinsics aggressively, but in order to do so I need some clarification on the intended semantics for the various FP precision-related TargetOptions. I've summarized the three relevant ones below: UnsafeFPMath - Defaults to off, enables "less precise" results than permitted by IEEE754. Comments specifically reference using hardware FSIN/FCOS on X86. NoExcessFPPrecision - Defaults to off (i.e. excess precision allowed), enables higher-precision implementations than specified by IEEE754. Comme...
2017 Jun 28
2
Override TargetOptions for block of code?
Hi, we generally run our JIT with UnsafeFPMath enabled, but there are a few specific instances where a block of code needs to follow strict FPMath. Is there a way to temporarily override TargetOptions for a specific block of IR? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/l...
2006 May 23
3
[LLVMdev] HEAD broken?
...vm-cvs/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp: In member function `void llvm::SelectionDAGLowering::visitSetCC(llvm::User&, llvm::ISD::CondCode, llvm::ISD::CondCode, llvm::ISD::CondCode)': /home/ghost/Work/llvm-cvs/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1107: error: ` UnsafeFPMath' undeclared (first use this function) /home/ghost/Work/llvm-cvs/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1107: error: (Each undeclared identifier is reported only once for each function it appears in.) /home/ghost/Work/llvm-cvs/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1107: erro...
2013 Jul 25
2
[LLVMdev] Clang/LLVM 3.3 unwanted attributes being added: NoFramePointerElim
...en the description of: ./lib/Target/TargetMachine.cpp RESET_OPTION(NoFramePointerElim, "no-frame-pointer-elim"); RESET_OPTION(NoFramePointerElimNonLeaf, "no-frame-pointer-elim-non-leaf"); RESET_OPTION(LessPreciseFPMADOption, "less-precise-fpmad"); RESET_OPTION(UnsafeFPMath, "unsafe-fp-math"); RESET_OPTION(NoInfsFPMath, "no-infs-fp-math"); RESET_OPTION(NoNaNsFPMath, "no-nans-fp-math"); RESET_OPTION(UseSoftFloat, "use-soft-float"); RESET_OPTION(DisableTailCalls, "disable-tail-calls"); I cannot find the code or...
2013 Jul 18
2
[LLVMdev] LLVM 3.3 JIT code speed
...d(EngineKind::JIT); builder.setUseMCJIT(true); builder.setCodeModel(CodeModel::JITDefault); builder.setMCPU(llvm::sys::getHostCPUName()); TargetOptions targetOptions; targetOptions.NoFramePointerElim = true; targetOptions.LessPreciseFPMADOption = true; targetOptions.UnsafeFPMath = true; targetOptions.NoInfsFPMath = true; targetOptions.NoNaNsFPMath = true; targetOptions.GuaranteedTailCallOpt = true; builder.setTargetOptions(targetOptions); TargetMachine* tm = builder.selectTarget(); fJIT = builder.create(tm); if (!fJIT) { return...
2018 Aug 20
3
Condition code in DAGCombiner::visitFADDForFMACombine?
...oating-point multiply-add with intermediate rounding. bool HasFMAD = (LegalOperations && TLI.isOperationLegal(ISD::FMAD, VT)); static bool isContractable(SDNode *N) { SDNodeFlags F = N->getFlags(); return F.hasAllowContract() || F.hasAllowReassociation(); } bool CanFuse = Options.UnsafeFPMath || isContractable(N); bool AllowFusionGlobally = (Options.AllowFPOpFusion == FPOpFusion::Fast || CanFuse || HasFMAD); // If the addition is not contractable, do not combine. if (!AllowFusionGlobally && !isContractable(N)) return SDValue(); Specifically the AllowFusionGlobally, I would...
2012 Feb 08
0
[LLVMdev] Clarifying FMA-related TargetOptions
...-related TargetOptions Hello everyone, I'd like to propose the attached patch to form FMA intrinsics aggressively, but in order to do so I need some clarification on the intended semantics for the various FP precision-related TargetOptions. I've summarized the three relevant ones below: UnsafeFPMath - Defaults to off, enables "less precise" results than permitted by IEEE754. Comments specifically reference using hardware FSIN/FCOS on X86. NoExcessFPPrecision - Defaults to off (i.e. excess precision allowed), enables higher-precision implementations than specified by IEEE754. Comme...
2010 Mar 03
2
[LLVMdev] folding x * 0 = 0
> You should check out the -enable-finite-only-fp-math and -enable-unsafe-fp-math options. Good hint, but llvm::UnsafeFPMath = true; llvm::FiniteOnlyFPMathOption = true; at the beginning of my code does not help. I found llvm::Reassociate::OptimizeExpression in llvm\lib\Transforms\Scalar\Reassociate.cpp which looks like it does X * 0 = 0 for int, but it does not get called for int, but it works for int. -Jochen
2010 Nov 20
3
[LLVMdev] Poor floating point optimizations?
...addss xmm2,xmm0 > 0046002C movss dword ptr [esp],xmm2 > 00460031 fld dword ptr [esp] > > Especially pxor&and instead of movss (which is unnecessary anyway) is just pure > madness. X+0.0 isn't the same as X if X is -0.0. Have you tried setting 'UnsafeFPMath' in TargetOptions.h? If you're still having problems, it would be best to indicate more about your configuration, how you're using the llvm tools/libs etc. -Chris
2013 Jul 18
0
[LLVMdev] LLVM 3.3 JIT code speed
...r.setUseMCJIT(true); > builder.setCodeModel(CodeModel::JITDefault); > builder.setMCPU(llvm::sys::getHostCPUName()); > > TargetOptions targetOptions; > targetOptions.NoFramePointerElim = true; > targetOptions.LessPreciseFPMADOption = true; > targetOptions.UnsafeFPMath = true; > targetOptions.NoInfsFPMath = true; > targetOptions.NoNaNsFPMath = true; > targetOptions.GuaranteedTailCallOpt = true; > > builder.setTargetOptions(targetOptions); > > TargetMachine* tm = builder.selectTarget(); > > fJIT = builder.create(tm...
2018 Aug 22
2
Condition code in DAGCombiner::visitFADDForFMACombine?
...AD = (LegalOperations && > TLI.isOperationLegal(ISD::FMAD, VT)); > > static bool isContractable(SDNode *N) { >   SDNodeFlags F = N->getFlags(); >   return F.hasAllowContract() || F.hasAllowReassociation(); > } > > bool CanFuse = Options.UnsafeFPMath || isContractable(N); > bool AllowFusionGlobally = (Options.AllowFPOpFusion == > FPOpFusion::Fast || CanFuse || HasFMAD); > // If the addition is not contractable, do not combine. > if (!AllowFusionGlobally && !isContractable(N)) >     return SDValue(); &...