llvm-6502/lib/IR
Sanjay Patel add74ff5ff Return undef on FP <-> Int conversions that overflow (PR21330).
The LLVM Lang Ref states for signed/unsigned int to float conversions:
"If the value cannot fit in the floating point value, the results are undefined."

And for FP to signed/unsigned int:
"If the value cannot fit in ty2, the results are undefined."

This matches the C definitions.

The existing behavior pins to infinity or a max int value, but that may just
lead to more confusion as seen in:
http://llvm.org/bugs/show_bug.cgi?id=21130

Returning undef will hopefully lead to a less silent failure.

Differential Revision: http://reviews.llvm.org/D5603



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219542 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-10 23:00:21 +00:00
..
AsmWriter.cpp Revert "Revert "DI: Fold constant arguments into a single MDString"" 2014-10-03 20:01:09 +00:00
AsmWriter.h IR: Implement uselistorder assembly directives 2014-08-19 21:30:15 +00:00
AttributeImpl.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
Attributes.cpp Revert accidentally committed r217107 2014-09-03 23:38:05 +00:00
AutoUpgrade.cpp Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
BasicBlock.cpp Move helper for getting a terminating musttail call to BasicBlock 2014-08-12 00:05:15 +00:00
CMakeLists.txt IPO: Add use-list-order verifier 2014-07-25 14:49:26 +00:00
Comdat.cpp IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
ConstantFold.cpp Return undef on FP <-> Int conversions that overflow (PR21330). 2014-10-10 23:00:21 +00:00
ConstantFold.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
ConstantRange.cpp [Modules] Move the ConstantRange class into the IR library. This is 2014-03-04 12:24:34 +00:00
Constants.cpp Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting them be implicitly created. 2014-08-27 05:25:25 +00:00
ConstantsContext.h IR: De-duplicate code for replacing operands in place 2014-08-19 19:13:30 +00:00
Core.cpp Return a std::unique_ptr when creating a new MemoryBuffer. 2014-08-27 20:03:13 +00:00
DataLayout.cpp Use cast<> instead of unchecked dyn_cast<> 2014-09-18 22:28:56 +00:00
DebugInfo.cpp Revert "DebugInfo: Ensure that all debug location scope chains from instructions within a function, lead to the function itself." 2014-10-10 18:46:21 +00:00
DebugLoc.cpp Revert "Revert "DI: Fold constant arguments into a single MDString"" 2014-10-03 20:01:09 +00:00
DiagnosticInfo.cpp Rename DiagnosticInfoOptimizationWarning to DiagnosticInfoOptimizationFailure 2014-07-18 19:36:04 +00:00
DiagnosticPrinter.cpp Fix typos in comments, NFC 2014-08-29 21:53:01 +00:00
DIBuilder.cpp Revert "Revert "DI: Fold constant arguments into a single MDString"" 2014-10-03 20:01:09 +00:00
Dominators.cpp Revert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges." 2014-07-21 17:06:51 +00:00
Function.cpp [AVX512] Added intrinsics for VPCMPEQB and VPCMPEQW. 2014-09-30 11:32:22 +00:00
GCOV.cpp Modernize raw_fd_ostream's constructor a bit. 2014-08-25 18:16:47 +00:00
Globals.cpp IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
GVMaterializer.cpp [Layering] Move GVMaterializer.h into the IR library where its 2014-03-06 03:50:29 +00:00
InlineAsm.cpp [inline asm] Add a check in InlineAsm::ConstraintInfo::Parse to make sure '{' 2014-09-05 22:30:32 +00:00
Instruction.cpp typo 2014-09-10 16:58:40 +00:00
Instructions.cpp Use dyn_cast<> instead of isa<> and cast<> 2014-09-15 17:56:51 +00:00
IntrinsicInst.cpp [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-09 06:08:46 +00:00
IRBuilder.cpp Add scoped-noalias metadata 2014-07-24 14:25:39 +00:00
IRPrintingPasses.cpp Fix some misplaced spaces around 'override' 2014-05-24 20:19:40 +00:00
LeakDetector.cpp [Modules] Move the LeakDetector header into the IR library where the 2014-03-04 12:46:06 +00:00
LeaksContext.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
LegacyPassManager.cpp Use range based for loops to avoid needing to re-mention SmallPtrSet size. 2014-08-24 23:23:06 +00:00
LLVMBuild.txt
LLVMContext.cpp LTO: Ignore disabled diagnostic remarks 2014-10-01 18:36:03 +00:00
LLVMContextImpl.cpp LTO: Ignore disabled diagnostic remarks 2014-10-01 18:36:03 +00:00
LLVMContextImpl.h LTO: Ignore disabled diagnostic remarks 2014-10-01 18:36:03 +00:00
Makefile Actually update the CMake and Makefile builds correctly, and update the 2013-01-02 12:09:16 +00:00
Mangler.cpp Don't count inreg params when mangling fastcall functions 2014-08-06 18:09:04 +00:00
MDBuilder.cpp Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting them be implicitly created. 2014-08-27 05:25:25 +00:00
Metadata.cpp Add scoped-noalias metadata 2014-07-24 14:25:39 +00:00
Module.cpp Be more careful in parsing Module::ModFlagBehavior value 2014-09-08 19:16:28 +00:00
module.modulemap [modules] Add module maps for LLVM. These are not quite ready for prime-time 2014-05-21 02:46:14 +00:00
Pass.cpp Remove pimpl class from PassRegistry. 2014-06-12 16:06:51 +00:00
PassManager.cpp Remove unnecessary/redundant std::move 2014-07-16 17:09:21 +00:00
PassRegistry.cpp [PM] Remove an unused and rather expensive mapping from an analysis 2014-10-06 00:30:59 +00:00
SymbolTableListTraitsImpl.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
Type.cpp Consider addrspaces in canLosslesslyBitCastTo() 2014-08-31 19:19:57 +00:00
TypeFinder.cpp TypeFinder: prefer iterative algorithm to keep stack usage low. 2013-10-16 04:10:06 +00:00
Use.cpp Fix a URL (NFC) 2014-08-21 21:09:24 +00:00
UseListOrder.cpp verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
User.cpp Disable Visual C++ warning 4722 about aborting a destructor, 2014-03-25 08:42:49 +00:00
Value.cpp Repace SmallPtrSet with SmallPtrSetImpl in function arguments to avoid needing to mention the size. 2014-08-21 05:55:13 +00:00
ValueSymbolTable.cpp [Modules] Remove potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:02:50 +00:00
ValueTypes.cpp Add v4f16 to supported value types. 2013-10-03 03:29:21 +00:00
Verifier.cpp Be more careful in parsing Module::ModFlagBehavior value 2014-09-08 19:16:28 +00:00