1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
llvm-mirror/test
Daniel Sanders 88b4a0878a [globalisel][tablegen] Fix PR35375 by sign-extending the table value to match getConstantVRegVal()
Summary:
From the bug report:
> The problem is that it fails when trying to compare -65536 (or 4294901760) to 0xFFFF,0000. This is because the
> constant in the instruction is sign extended to 64 bits (0xFFFF,FFFF,FFFF,0000) and then compared to the non
> extended 64 bit version expected by TableGen.
> 
> In contrast, the DAGISelEmitter generates special code for AND immediates (OPC_CheckAndImm), which does not
> sign extend.

This patch doesn't introduce the special case for AND (and OR) immediates since the majority of it is related to handling known bits that have no effect on the result and GlobalISel doesn't detect known-bits at this time. Instead this patch just ensures that the immediate is extended consistently on both sides of the check.

Thanks to Diana Picus for the detailed bug report.

Reviewers: rovka

Reviewed By: rovka

Subscribers: kristof.beyls, javed.absar, llvm-commits

Differential Revision: https://reviews.llvm.org/D40532

llvm-svn: 319252
2017-11-28 23:18:54 +00:00
..
Analysis [SCEV] Strengthen variance condition in calculateLoopDisposition 2017-11-22 06:21:39 +00:00
Assembler
Bindings
Bitcode [ThinLTO] Remove too aggressive assertion in building function call graph. 2017-11-17 18:28:05 +00:00
BugPoint
CodeGen [globalisel][tablegen] Fix PR35375 by sign-extending the table value to match getConstantVRegVal() 2017-11-28 23:18:54 +00:00
DebugInfo SROA: Don't create variable fragments that are outside of the variable. 2017-11-28 21:30:38 +00:00
Examples
ExecutionEngine
Feature
FileCheck
Instrumentation [MSan] Move the access address check before the shadow access for that address 2017-11-23 08:34:32 +00:00
Integer
JitListener
Linker
LTO Object: Improve COFF irsymtab comdat representation. 2017-11-21 22:06:20 +00:00
MC AMDGPU: Add num spilled s/vgprs to metadata 2017-11-28 17:51:08 +00:00
Object [AMDGPU][MC][GFX8][GFX9] Corrected names of integer v_{add/addc/sub/subrev/subb/subbrev} 2017-11-20 18:24:21 +00:00
ObjectYAML
Other Add a new pass to speculate around PHI nodes with constant (integer) operands when profitable. 2017-11-28 11:32:31 +00:00
SafepointIRVerifier
SymbolRewriter
TableGen [globalisel][tablegen] Add support for importing G_ATOMIC_CMPXCHG, G_ATOMICRMW_* rules from SelectionDAG. 2017-11-28 22:07:05 +00:00
ThinLTO/X86
tools Add opt-viewer testing 2017-11-28 17:26:28 +00:00
Transforms Remove this test 2017-11-28 22:39:38 +00:00
Unit
Verifier
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg.py Add opt-viewer testing 2017-11-28 17:26:28 +00:00
lit.site.cfg.py.in Add opt-viewer testing 2017-11-28 17:26:28 +00:00
TestRunner.sh