mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
a2db98f70d
ISD::isConstantSplatVector can shrink to the smallest splat width. But we don't check the size of the resulting APInt at all. This can cause us to misinterpret the results. This patch just adds a flag to prevent the APInt from changing width. Fixes PR34271. Differential Revision: https://reviews.llvm.org/D36996 llvm-svn: 311429
15 lines
444 B
LLVM
15 lines
444 B
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s
|
|
|
|
; CHECK: .LCPI0_0:
|
|
; CHECK-NEXT: .zero 16,1
|
|
|
|
define <4 x i32> @f(<4 x i32> %a) {
|
|
; CHECK-LABEL: f:
|
|
; CHECK: # BB#0:
|
|
; CHECK-NEXT: paddd .LCPI0_0(%rip), %xmm0
|
|
; CHECK-NEXT: retq
|
|
%v = add nuw nsw <4 x i32> %a, <i32 16843009, i32 16843009, i32 16843009, i32 16843009>
|
|
ret <4 x i32> %v
|
|
}
|