mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
2cf4b388e8
Don't try to fold away shuffles which can't be folded. Fix creation of shufflevector constant expressions. Differential Revision: https://reviews.llvm.org/D71147
12 lines
623 B
LLVM
12 lines
623 B
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
; RUN: opt < %s -constprop -S | FileCheck %s
|
|
|
|
define <vscale x 4 x i32> @shufflevector_scalable_constant() {
|
|
; CHECK-LABEL: @shufflevector_scalable_constant(
|
|
; CHECK-NEXT: ret <vscale x 4 x i32> shufflevector (<vscale x 4 x i32> insertelement (<vscale x 4 x i32> undef, i32 1, i32 0), <vscale x 4 x i32> undef, <vscale x 4 x i32> zeroinitializer)
|
|
;
|
|
%i = insertelement <vscale x 4 x i32> undef, i32 1, i32 0
|
|
%i2 = shufflevector <vscale x 4 x i32> %i, <vscale x 4 x i32> undef, <vscale x 4 x i32> zeroinitializer
|
|
ret <vscale x 4 x i32> %i2
|
|
}
|