1 ; RUN: opt -mtriple=x86_64-darwin-unknown -S -consthoist < %s | FileCheck %s
3 define i128 @test1(i128 %a) nounwind {
5 ; CHECK: %const = bitcast i128 12297829382473034410122878 to i128
6 %1 = add i128 %a, 12297829382473034410122878
7 %2 = add i128 %1, 12297829382473034410122878
11 ; Check that we don't hoist the shift value of a shift instruction.
12 define i512 @test2(i512 %a) nounwind {
14 ; CHECK-NOT: %const = bitcast i512 504 to i512
16 %2 = ashr i512 %1, 504
20 ; Check that we don't hoist constants with a type larger than i128.
21 define i196 @test3(i196 %a) nounwind {
23 ; CHECK-NOT: %const = bitcast i196 2 to i196
29 ; Check that we don't hoist immediates with small values.
30 define i96 @test4(i96 %a) nounwind {
32 ; CHECK-NOT: %const = bitcast i96 2 to i96