Displaying 20 results from an estimated 112 matches for "frem".
Did you mean:
free
2015 Sep 14
2
[LLVMDev] Inconsistent result between GCC and Clang for __builtin_fmodf
...rn 0;
}
$ g++ -o builtin_fmodf_bugpoint_gcc builtin_fmodf_bugpoint.cpp
$ ./builtin_fmodf_bugpoint_gcc
1.000000 fmodf 0.100000 = 0.100000
$ clang++ -o builtin_fmodf_bugpoint_clang builtin_fmodf_bugpoint.cpp
1.000000 fmodf 0.100000 = 0.000000
Clang will compile __builtin_fmod() into LLVM's "frem" [1]. Since both
operands are constant, it is constant folded by IRBuilder at the time when
"frem" was built. The exeuction finally goes to
llvm::ConstantFoldBinaryInstruction() which uses APFloat::mod() to compute
the result. As you can see from above, it gives us 0.000000 (hex: 0x0...
2018 Feb 28
3
how to simplify FP ops with an undef operand?
%y = fadd float %x, undef
Can we simplify this?
Currently in IR, we do nothing for fadd/fsub/fmul. For fdiv/frem, we
propagate undef. The code comment for fdiv/frem says:
"the undef could be a snan"
If that's correct, then shouldn't it be the same for fadd/fsub/fmul? But
this can't be correct because we support targets that don't raise
exceptions...and even targets that raise except...
2018 Sep 25
2
Unsafe floating point operation (FDiv & FRem) in LoopVectorizer
...oopVectorizationCostModel::isScalarWithPredication(Instruction *I, unsigned VF) {
if (!Legal->blockNeedsPredication(I->getParent()))
return false;
switch(I->getOpcode()) {
default:
break;
case Instruction::UDiv: <- Floating point operations not considered i.e FDiv & FRem
case Instruction::SDiv:
case Instruction::SRem:
case Instruction::URem:
return mayDivideByZero(*I);
}
I don't have any background of this function, but I feel this should consider FDiv & FRem instructions as well.
If there is no objection to it, will do a patch.
Thanks,
Ashutos...
2007 Nov 27
3
[LLVMdev] Other Intrinsics?
...; Intrinsics get added on demand. Generally there has to be a good reason
> to add them. llvm.sin was implemented (for example) to allow generation
> of code that uses vector sin operations.
What is the criteria for adding an intrinsic or a built-in operation?
For example, could the 'frem' instruction be an intrinsic? Could you
remove it from LLVM entirely and make it an external function? What
distinguishes 'frem' from 'sin', 'pow', 'atan2', etc.?
Regards,
Jon
2012 Apr 20
0
[LLVMdev] FRem generates call 0 on windows 7 x64, msvc 2010 sp1 x86
Hi Guys,
I found that FRem generates instruction *call 0* by JIT on windows 7, msvc
2010 sp1 x86, and llvm.exp.f32 also has this issue.
My LLVM version is official 3.0.
Anyone give me some tips ? Thanks a lot !
SALVIA Project Manager
Ye WU
http://code.google.com/p/softart
--
Ye Wu
CELL: +86 159 9957 0103
--------------...
2008 Mar 31
3
[LLVMdev] Reference Manual Clarifications
...rem instead of
srem asserts that the arguments are unsigned.
urem/srem Instruction: Move remainder/modulo discussion from srem to
urem since many readers will read the document from top to bottom.
In any case, both instructions should state "result has the same sign as
the dividend".
frem Instruction: There are four ways to define frem based on the
rounding mode. The 8087 provides two of these: fprem and fprem1.
Assuming the instruction uses the round-to-zero version of frem, add
"calculated as <var1>-<var2>*floor(<var1>/<var2>)"
Bitwise Binary...
2018 Feb 28
0
how to simplify FP ops with an undef operand?
...%x is a NaN then the result will be NaN for any value of the undef, right? So if I understand the undef rules correctly (never a certainty) then we can’t safely replace the expression with undef. We could, I think, replace it with “%y = %x” though. I think the same is true for fadd, fsub, fmul, and frem.
-Andy
From: Sanjay Patel [mailto:spatel at rotateright.com]
Sent: Tuesday, February 27, 2018 6:29 PM
To: llvm-dev <llvm-dev at lists.llvm.org>
Cc: Nuno Lopes <nunoplopes at sapo.pt>; Stephen Canon <scanon at apple.com>; David Majnemer <david.majnemer at gmail.com>; John R...
2018 Feb 28
2
how to simplify FP ops with an undef operand?
...result will be NaN for
> any value of the undef, right? So if I understand the undef rules correctly
> (never a certainty) then we can’t safely replace the expression with undef.
> We could, I think, replace it with “%y = %x” though. I think the same is
> true for fadd, fsub, fmul, and frem.
>
>
>
> -Andy
>
>
>
>
> %y = fadd float %x, undef
>
>
>
> Can we simplify this?
>
> Currently in IR, we do nothing for fadd/fsub/fmul. For fdiv/frem, we
> propagate undef. The code comment for fdiv/frem says:
> "the undef could be a snan"...
2018 Feb 28
0
how to simplify FP ops with an undef operand?
...%x is a NaN then the result will be NaN for any value of the undef, right? So if I understand the undef rules correctly (never a certainty) then we can’t safely replace the expression with undef. We could, I think, replace it with “%y = %x” though. I think the same is true for fadd, fsub, fmul, and frem.
-Andy
%y = fadd float %x, undef
Can we simplify this?
Currently in IR, we do nothing for fadd/fsub/fmul. For fdiv/frem, we propagate undef. The code comment for fdiv/frem says:
"the undef could be a snan"
If that's correct, then shouldn't it be the same for fadd/fsub/fmul?...
2009 Apr 08
2
[LLVMdev] What is the state of LLVM's ARM backend
...> Ciao,
>
> Duncan.
>
Great work Duncan!
I recompiled llvm and restested the failing softenfloat tests on my machine:
2007-11-19-VectorSplitting.ll
OK!
vector-constantexpr.ll
OK!
vector-constantexpr.ll
OK!
llvm-as < print-arith-fp.l
l | llc
SoftenFloatResult #0: 0x61aad8: f64 = frem 0x619fb0, 0x619ea0
llc:
/usr/src/openembedded/overo/tmp/work/armv7a-angstrom-linux-gnueabi/llvm2.6-2.6-r1/llvm-2.6/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp:54:
void llvm::DAGTypeLegalizer::SoftenFloatResult(llvm::SDNode*, unsigned
int): Assertion `0 && "Do not know how to sof...
2007 Nov 27
0
[LLVMdev] Other Intrinsics?
...demand. Generally there has to be a good reason
> > to add them. llvm.sin was implemented (for example) to allow generation
> > of code that uses vector sin operations.
>
> What is the criteria for adding an intrinsic or a built-in operation?
> For example, could the 'frem' instruction be an intrinsic? Could you
> remove it from LLVM entirely and make it an external function? What
> distinguishes 'frem' from 'sin', 'pow', 'atan2', etc.?
The main difference from my perspective between intrinsics and instructions
is that i...
2018 Feb 28
2
how to simplify FP ops with an undef operand?
...result will be NaN for
> any value of the undef, right? So if I understand the undef rules correctly
> (never a certainty) then we can’t safely replace the expression with undef.
> We could, I think, replace it with “%y = %x” though. I think the same is
> true for fadd, fsub, fmul, and frem.
>
>
>
> -Andy
>
>
>
>
>
> %y = fadd float %x, undef
>
>
>
> Can we simplify this?
>
> Currently in IR, we do nothing for fadd/fsub/fmul. For fdiv/frem, we
> propagate undef. The code comment for fdiv/frem says:
> "the undef could be a snan...
2007 Dec 20
1
[LLVMdev] Code Generation Problem llvm 1.9
...mp2.loc = alloca int ; <int*> [#uses=2]
%castLongToGV14 = cast long %pointerArithmetic13 to double* ; <double*> [#uses=1]
store double 2.000000e+00, double* %castLongToGV14
cast int %x to double ; <double>:31 [#uses=1]
frem double %31, 1.000000e+02 ; <double>:32 [#uses=2]
%castPointerToLong15 = cast [10 x double]* %DataStore to long ; <long> [#uses=1]
%pointerArithmetic16 = add long %castPointerToLong15, 24 ; <long> [#uses=1]
%castLongToGV17...
2018 Feb 28
0
how to simplify FP ops with an undef operand?
...%x is a NaN then the result will be NaN for any value of the undef, right? So if I understand the undef rules correctly (never a certainty) then we can’t safely replace the expression with undef. We could, I think, replace it with “%y = %x” though. I think the same is true for fadd, fsub, fmul, and frem.
-Andy
%y = fadd float %x, undef
Can we simplify this?
Currently in IR, we do nothing for fadd/fsub/fmul. For fdiv/frem, we propagate undef. The code comment for fdiv/frem says:
"the undef could be a snan"
If that's correct, then shouldn't it be the same for fadd/fsub/fmul?...
2018 Feb 28
3
how to simplify FP ops with an undef operand?
...result will be NaN for
> any value of the undef, right? So if I understand the undef rules correctly
> (never a certainty) then we can’t safely replace the expression with undef.
> We could, I think, replace it with “%y = %x” though. I think the same is
> true for fadd, fsub, fmul, and frem.
>
>
>
> -Andy
>
>
>
>
>
> %y = fadd float %x, undef
>
>
>
> Can we simplify this?
>
> Currently in IR, we do nothing for fadd/fsub/fmul. For fdiv/frem, we
> propagate undef. The code comment for fdiv/frem says:
> "the undef could be a snan...
2015 Feb 19
2
[LLVMdev] [PATCH] Minor typos corrected in docs
...o have the same address as
the aliasee expression. ``unnamed_addr`` ones are only guaranteed to point
to the same content.
@@ -1779,7 +1779,7 @@
LLVM IR floating-point binary ops (:ref:`fadd <i_fadd>`,
:ref:`fsub <i_fsub>`, :ref:`fmul <i_fmul>`, :ref:`fdiv <i_fdiv>`,
-:ref:`frem <i_frem>`) have the following flags that can set to enable
+:ref:`frem <i_frem>`) have the following flags that can be set to enable
otherwise unsafe floating point operations
``nnan``
Index: docs/CodeGenerator.rst
===================================================================
---...
2020 Feb 07
3
Why does FPBinOp(X, undef) -> NaN?
I came across this comment in SelectionDAG.cpp:
case ISD::FADD:
case ISD::FSUB:
case ISD::FMUL:
case ISD::FDIV:
case ISD::FREM:
// If both operands are undef, the result is undef. If 1 operand is undef,
// the result is NaN. This should match the behavior of the IR optimizer.
That isn't intuitive to me. I would have expected a binary FP
operation with one undef operand to fold to undef. Does anyone know
the re...
2010 May 15
7
Unable to Destroy One Particular Snapshot
Howdy All,
I''ve a bit of a strange problem here. I have a filesystem with one snapshot that simply refuses to be destroyed. The snapshots just prior to it and just after it were destroyed without problem. While running the zfs destroy command on this particular snapshot, the server becomes more-or-less hung. It''s pingable but will not open a new shell (local or via ssh) however
2018 Feb 28
5
how to simplify FP ops with an undef operand?
...%x is a NaN then the result will be NaN for any value of the undef, right? So if I understand the undef rules correctly (never a certainty) then we can’t safely replace the expression with undef. We could, I think, replace it with “%y = %x” though. I think the same is true for fadd, fsub, fmul, and frem.
-Andy
%y = fadd float %x, undef
Can we simplify this?
Currently in IR, we do nothing for fadd/fsub/fmul. For fdiv/frem, we propagate undef. The code comment for fdiv/frem says:
"the undef could be a snan"
If that's correct, then shouldn't it be the same for fadd/fsub/fmul?...
2018 Feb 28
0
how to simplify FP ops with an undef operand?
...right? So if I understand the undef rules correctly
> (never a certainty) then we can’t safely replace the
> expression with undef. We could, I think, replace it with
> “%y = %x” though. I think the same is true for fadd, fsub,
> fmul, and frem.
>
> -Andy
>
> %y = fadd float %x, undef
>
> Can we simplify this?
>
> Currently in IR, we do nothing for fadd/fsub/fmul. For
> fdiv/frem, we propagate undef. The code comment for
> fdiv/frem says:...