llvm-capstone/llvm/test/BugPoint/retain-crashing-metadata.ll
Florian Hahn 29e8b8ce66 [bugpoint] Reduce metadata that does not contribute to crash.
Add a new reducer that drops metadata that does not contribute to the
crash from instructions.

It adjusts the metadata.ll test case, as now also the instruction level
metadata will get dropped.

Reviewers: davide, reames, modocache

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D69234
2019-10-30 15:11:56 +00:00

23 lines
784 B
LLVM

; REQUIRES: plugins
; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t-notype -bugpoint-crashmetadata -silence-passes > /dev/null
; RUN: llvm-dis %t-notype-reduced-simplified.bc -o - | FileCheck %s
;
; Make sure BugPoint retains metadata contributing to a crash.
; CHECK-LABEL: define void @test2(float %f) {
; CHECK-NEXT: %arg = fadd float %f, 1.000000e+01
; CHECK-NOT: !fpmath
; CHECK-NEXT: %x = call float @llvm.fabs.f32(float %arg), !fpmath [[FPMATH:![0-9]+]]
; CHECK-NEXT: ret void
; CHECK: [[FPMATH]] = !{float 2.500000e+00}
define void @test2(float %f) {
%arg = fadd float %f, 1.000000e+01, !fpmath !0
%x = call float @llvm.fabs.f32(float %arg), !fpmath !0
ret void
}
declare float @llvm.fabs.f32(float)
!0 = !{float 2.500000e+00}