Files
clang-p2996/llvm/test/Transforms/Scalarizer/phi-bug-inseltpoison.ll
Juneyoung Lee ae6e89327b Precommit tests that have poison as shufflevector's placeholder
This commit copies existing tests at llvm/Transforms containing
'shufflevector X, undef' and replaces them with 'shufflevector X, poison'.
The new copied tests have *-inseltpoison.ll suffix at its file name
(as db7a2f347f did)
See https://reviews.llvm.org/D93793

Test files listed using

grep -R -E "^[^;]*shufflevector <.*> .*, <.*> undef" | cut -d":" -f1 | uniq

Test files copied & updated using

file_org=llvm/test/Transforms/$1
if [[ "$file_org" = *-inseltpoison.ll ]]; then
  file=$file_org
else
  file=${file_org%.ll}-inseltpoison.ll
  if [ ! -f $file ]; then
    cp $file_org $file
  fi
fi
sed -i -E 's/^([^;]*)shufflevector <(.*)> (.*), <(.*)> undef/\1shufflevector <\2> \3, <\4> poison/g' $file
head -1 $file | grep "Assertions have been autogenerated by utils/update_test_checks.py" -q
if [ "$?" == 1 ]; then
  echo "$file : should be manually updated"
  # The test is manually updated
  exit 1
fi
python3 ./llvm/utils/update_test_checks.py --opt-binary=./build-releaseassert/bin/opt $file
2020-12-29 17:09:31 +09:00

26 lines
567 B
LLVM

; RUN: opt %s -scalarizer -verify -S -o - | FileCheck %s
; RUN: opt %s -passes='function(scalarizer,verify)' -S -o - | FileCheck %s
define void @f3() local_unnamed_addr {
bb1:
br label %bb2
bb3:
; CHECK-LABEL: bb3:
; CHECK-NEXT: br label %bb4
%h.10.0.vec.insert = shufflevector <1 x i16> %h.10.1, <1 x i16> poison, <1 x i32> <i32 0>
br label %bb4
bb2:
; CHECK-LABEL: bb2:
; CHECK: phi i16
%h.10.1 = phi <1 x i16> [ undef, %bb1 ]
br label %bb3
bb4:
; CHECK-LABEL: bb4:
; CHECK: phi i16
%h.10.2 = phi <1 x i16> [ %h.10.0.vec.insert, %bb3 ]
ret void
}