llvm-6502/test/CodeGen
Juergen Ributzka d10a9fb25a [DAG] During DAG legalization keep opaque constants even after expanding.
The included test case would return the incorrect results, because the expansion
of an shift with a constant shift amount of 0 would generate undefined behavior.

This is because ExpandShiftByConstant assumes that all shifts by constants with
a value of 0 have already been optimized away. This doesn't happen for opaque
constants and usually this isn't a problem, because opaque constants won't take
this code path - they are not supposed to. In the case that the opaque constant
has to be expanded by the legalizer, the legalizer would drop the opaque flag.
In this case we hit the limitations of ExpandShiftByConstant and create incorrect
code.

This commit fixes the legalizer by not dropping the opaque flag when expanding
opaque constants and adding an assertion to ExpandShiftByConstant to catch this
not supported case in the future.

This fixes <rdar://problem/16718472>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207304 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-26 02:58:04 +00:00
..
AArch64 [ARM64] Print preferred aliases for SFBM/UBFM in InstPrinter 2014-04-25 10:25:29 +00:00
ARM ARM: remove @llvm.arm.sevl 2014-04-25 17:51:25 +00:00
ARM64 [ARM64] When compiling for ELF in PIC mode, local symbols shouldn't go through the GOT 2014-04-25 13:43:18 +00:00
CPP
Generic
Hexagon Fix broken CHECK lines 2014-02-16 07:31:05 +00:00
Inputs
Mips
MSP430
NVPTX
PowerPC
R600
SPARC
SystemZ
Thumb
Thumb2
X86 [DAG] During DAG legalization keep opaque constants even after expanding. 2014-04-26 02:58:04 +00:00
XCore Reapply "blockfreq: Rewrite BlockFrequencyInfoImpl" 2014-04-21 17:57:07 +00:00