summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PowerPC
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2016-09-04 06:07:19 +0000
committerHal Finkel <hfinkel@anl.gov>2016-09-04 06:07:19 +0000
commit73390c7acd40a5c7a1802c0f78b660f6a336b860 (patch)
treec27324154c5aec2faada72642698fafdbb952d3a /llvm/test/CodeGen/PowerPC
parentfb6358d2b5b25601a3172011238e229995f1b1a4 (diff)
downloadbcm5719-llvm-73390c7acd40a5c7a1802c0f78b660f6a336b860.tar.gz
bcm5719-llvm-73390c7acd40a5c7a1802c0f78b660f6a336b860.zip
[PowerPC] Zero-extend constants in FastISel
As it turns out, whether we zero-extend or sign-extend i8/i16 constants, which are illegal types promoted to i32 on PowerPC, is a choice constrained by assumptions within the infrastructure. Specifically, the logic in FunctionLoweringInfo::ComputePHILiveOutRegInfo assumes that constant PHI operands will be zero extended, and so, at least when materializing constants that are PHI operands, we must do the same. The rest of our fast-isel implementation does not appear to depend on the fact that we were sign-extending i8/i16 constants, and all other targets also appear to zero-extend small-bitwidth constants in fast-isel; we'll now do the same (we had been doing this only for i1 constants, and sign-extending the others). Fixes PR27721. llvm-svn: 280614
Diffstat (limited to 'llvm/test/CodeGen/PowerPC')
-rw-r--r--llvm/test/CodeGen/PowerPC/fast-isel-call.ll6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/test/CodeGen/PowerPC/fast-isel-call.ll b/llvm/test/CodeGen/PowerPC/fast-isel-call.ll
index 5d541e3a01f..4526db021a2 100644
--- a/llvm/test/CodeGen/PowerPC/fast-isel-call.ll
+++ b/llvm/test/CodeGen/PowerPC/fast-isel-call.ll
@@ -61,11 +61,11 @@ entry:
; ELF64: t10
%call = call i32 @bar(i8 zeroext 0, i8 zeroext -8, i8 zeroext -69, i8 zeroext 28, i8 zeroext 40, i8 zeroext -70)
; ELF64: li 3, 0
-; ELF64: li 4, -8
-; ELF64: li 5, -69
+; ELF64: li 4, 248
+; ELF64: li 5, 187
; ELF64: li 6, 28
; ELF64: li 7, 40
-; ELF64: li 8, -70
+; ELF64: li 8, 186
; ELF64: rldicl 3, 3, 0, 56
; ELF64: rldicl 4, 4, 0, 56
; ELF64: rldicl 5, 5, 0, 56
OpenPOWER on IntegriCloud