]> granicus.if.org Git - llvm/commit
[ARM] GlobalISel: Fix extended stack operands
authorDiana Picus <diana.picus@linaro.org>
Thu, 27 Apr 2017 10:23:30 +0000 (10:23 +0000)
committerDiana Picus <diana.picus@linaro.org>
Thu, 27 Apr 2017 10:23:30 +0000 (10:23 +0000)
commit6790813007a4179fc2d72827122ba90dc2acd28c
treefee04930c2dea79f1279bf731d784872cfbffc86
parent9ec7e0297d03c0d8c673c05f6094093565e10f7b
[ARM] GlobalISel: Fix extended stack operands

Fix a crash when trying to extend a value passed as a sign- or
zero-extended stack parameter. The cause of the crash was that we were
setting the size of the loaded value to 32 bits, and then tyring to
extend again to 32 bits.

This patch addresses the issue by also introducing a G_TRUNC after the
load. This will leave the unused bits to their original values set by
the caller, while being consistent about the types. For values that are
not extended, we just use a smaller load.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301531 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMCallLowering.cpp
test/CodeGen/ARM/GlobalISel/arm-irtranslator.ll
test/CodeGen/ARM/GlobalISel/arm-isel.ll