1; RUN: opt < %s -instcombine -S | FileCheck %s 2 3define double @a(<1 x i64> %y) { 4; CHECK-LABEL: @a( 5; CHECK-NEXT: [[BC:%.*]] = bitcast <1 x i64> %y to <1 x double> 6; CHECK-NEXT: [[C:%.*]] = extractelement <1 x double> [[BC]], i32 0 7; CHECK-NEXT: ret double [[C]] 8; 9 %c = bitcast <1 x i64> %y to double 10 ret double %c 11} 12 13define i64 @b(<1 x i64> %y) { 14; CHECK-LABEL: @b( 15; CHECK-NEXT: [[TMP1:%.*]] = extractelement <1 x i64> %y, i32 0 16; CHECK-NEXT: ret i64 [[TMP1]] 17; 18 %c = bitcast <1 x i64> %y to i64 19 ret i64 %c 20} 21 22define <1 x i64> @c(double %y) { 23; CHECK-LABEL: @c( 24; CHECK-NEXT: [[TMP1:%.*]] = bitcast double %y to i64 25; CHECK-NEXT: [[C:%.*]] = insertelement <1 x i64> undef, i64 [[TMP1]], i32 0 26; CHECK-NEXT: ret <1 x i64> [[C]] 27; 28 %c = bitcast double %y to <1 x i64> 29 ret <1 x i64> %c 30} 31 32define <1 x i64> @d(i64 %y) { 33; CHECK-LABEL: @d( 34; CHECK-NEXT: [[C:%.*]] = insertelement <1 x i64> undef, i64 %y, i32 0 35; CHECK-NEXT: ret <1 x i64> [[C]] 36; 37 %c = bitcast i64 %y to <1 x i64> 38 ret <1 x i64> %c 39} 40 41