From f0024d14f10564532eec392a7c468ad79143f6b0 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Sat, 25 Jul 2015 00:48:08 +0000 Subject: Fix PPCMaterializeInt to check the size of the integer based on the extension property we're requesting - zero or sign extended. This fixes cases where we want to return a zero extended 32-bit -1 and not be sign extended for the entire register. Also updated the already out of date comment with the current behavior. llvm-svn: 243192 --- llvm/test/CodeGen/PowerPC/fast-isel-ret.ll | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'llvm/test/CodeGen/PowerPC/fast-isel-ret.ll') diff --git a/llvm/test/CodeGen/PowerPC/fast-isel-ret.ll b/llvm/test/CodeGen/PowerPC/fast-isel-ret.ll index eee4f313ee9..e05ef7d9ab8 100644 --- a/llvm/test/CodeGen/PowerPC/fast-isel-ret.ll +++ b/llvm/test/CodeGen/PowerPC/fast-isel-ret.ll @@ -176,3 +176,13 @@ entry: ; ELF64: blr ret double 2.5e-33; } + +define zeroext i32 @ret19() nounwind { +entry: +; ELF64-LABEL: ret19 +; ELF64: li +; ELF64: oris +; ELF64: ori +; ELF64: blr + ret i32 -1 +} -- cgit v1.2.3