mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-21 19:25:26 -04:00
03d8600380
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311429 91177308-0d34-0410-b5e6-96231b3b80d8
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
|
|
}
|