summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorJuergen Ributzka <juergen@apple.com>2014-05-19 21:00:53 +0000
committerJuergen Ributzka <juergen@apple.com>2014-05-19 21:00:53 +0000
commit431761771c560dd38a3b33bc9009d939808c8f09 (patch)
tree2776ef6c4a7e22476f0b7bd483db0a067acf3836 /llvm/test
parent851072efb735dcd66d1fbfaa434c2c9d7708e29a (diff)
downloadbcm5719-llvm-431761771c560dd38a3b33bc9009d939808c8f09.tar.gz
bcm5719-llvm-431761771c560dd38a3b33bc9009d939808c8f09.zip
[ConstantHoisting][X86] Change the cost model to never hoist constants for types larger than i128.
Currently the X86 backend doesn't support types larger than i128 very well. For example an i192 multiply will assert in codegen when the 2nd argument is a constant and the constant got hoisted. This fix changes the cost model to never hoist constants for types larger than i128. Once the codegen issues have been resolved, the cost model can be updated to allow also larger types. This is related to <rdar://problem/16954938> llvm-svn: 209162
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Transforms/ConstantHoisting/X86/large-immediate.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/Transforms/ConstantHoisting/X86/large-immediate.ll b/llvm/test/Transforms/ConstantHoisting/X86/large-immediate.ll
index bd7fa40e9c5..e0af9c9be57 100644
--- a/llvm/test/Transforms/ConstantHoisting/X86/large-immediate.ll
+++ b/llvm/test/Transforms/ConstantHoisting/X86/large-immediate.ll
@@ -16,3 +16,12 @@ define i512 @test2(i512 %a) nounwind {
%2 = ashr i512 %1, 504
ret i512 %2
}
+
+; Check that we don't hoist constants with a type larger than i128.
+define i196 @test3(i196 %a) nounwind {
+; CHECK-LABEL: test3
+; CHECK-NOT: %const = bitcast i196 2 to i196
+ %1 = mul i196 %a, 2
+ %2 = mul i196 %1, 2
+ ret i196 %2
+}
OpenPOWER on IntegriCloud