brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.8 KiB · f220fc4 Raw
291 lines · plain
1; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=instruction-flags --test FileCheck --test-arg --check-prefixes=INTERESTING,CHECK --test-arg %s --test-arg --input-file %s -o %t2; RUN: FileCheck -check-prefixes=RESULT,CHECK %s < %t3 4; CHECK-LABEL: @add_nuw_nsw_none(5; INTERESTING: = add6; RESULT: add i327define i32 @add_nuw_nsw_none(i32 %a, i32 %b) {8  %op = add nuw nsw i32 %a, %b9  ret i32 %op10}11 12; CHECK-LABEL: @add_nuw_nsw_keep_nuw(13; INTERESTING: nuw14; RESULT: add nuw i3215define i32 @add_nuw_nsw_keep_nuw(i32 %a, i32 %b) {16  %op = add nuw nsw i32 %a, %b17  ret i32 %op18}19 20; CHECK-LABEL: @add_nuw_nsw_keep_nsw(21; INTERESTING: nuw22; RESULT: add nuw i3223define i32 @add_nuw_nsw_keep_nsw(i32 %a, i32 %b) {24  %op = add nuw nsw i32 %a, %b25  ret i32 %op26}27 28; CHECK-LABEL: @add_nuw_keep_nuw(29; INTERESTING: nuw30; RESULT: add nuw i3231define i32 @add_nuw_keep_nuw(i32 %a, i32 %b) {32  %op = add nuw i32 %a, %b33  ret i32 %op34}35 36; CHECK-LABEL: @add_nsw_keep_nsw(37; INTERESTING: nsw38; RESULT: add nsw i3239define i32 @add_nsw_keep_nsw(i32 %a, i32 %b) {40  %op = add nsw i32 %a, %b41  ret i32 %op42}43 44; CHECK-LABEL: @ashr_exact_drop(45; INTERESTING: = ashr46; RESULT: ashr i3247define i32 @ashr_exact_drop(i32 %a, i32 %b) {48  %op = ashr exact i32 %a, %b49  ret i32 %op50}51 52; CHECK-LABEL: @ashr_exact_keep(53; INTERESTING: exact54; RESULT: ashr exact i3255define i32 @ashr_exact_keep(i32 %a, i32 %b) {56  %op = ashr exact i32 %a, %b57  ret i32 %op58}59 60; CHECK-LABEL: @getelementptr_inbounds_nuw_drop_both(61; INTERESTING: getelementptr62; RESULT: getelementptr i32, ptr %a, i64 %b63define ptr @getelementptr_inbounds_nuw_drop_both(ptr %a, i64 %b) {64  %op = getelementptr inbounds nuw i32, ptr %a, i64 %b65  ret ptr %op66}67 68; CHECK-LABEL: @getelementptr_inbounds_keep_only_inbounds(69; INTERESTING: inbounds70; RESULT: getelementptr inbounds i32, ptr %a, i64 %b71define ptr @getelementptr_inbounds_keep_only_inbounds(ptr %a, i64 %b) {72  %op = getelementptr inbounds nuw i32, ptr %a, i64 %b73  ret ptr %op74}75 76; CHECK-LABEL: @getelementptr_inbounds_relax_to_nusw(77; INTERESTING: getelementptr {{inbounds|nusw}}78; RESULT: getelementptr nusw i32, ptr %a, i64 %b79define ptr @getelementptr_inbounds_relax_to_nusw(ptr %a, i64 %b) {80  %op = getelementptr inbounds i32, ptr %a, i64 %b81  ret ptr %op82}83 84; CHECK-LABEL: @fadd_reassoc_none(85; INTERESTING: = fadd86; RESULT: fadd float87define float @fadd_reassoc_none(float %a, float %b) {88  %op = fadd reassoc float %a, %b89  ret float %op90}91 92; CHECK-LABEL: @fadd_reassoc_keep(93; INTERESTING: fadd reassoc94; RESULT: fadd reassoc float95define float @fadd_reassoc_keep(float %a, float %b) {96  %op = fadd reassoc float %a, %b97  ret float %op98}99 100; CHECK-LABEL: @fadd_nnan_none(101; INTERESTING: = fadd102; RESULT: fadd float103define float @fadd_nnan_none(float %a, float %b) {104  %op = fadd nnan float %a, %b105  ret float %op106}107 108; CHECK-LABEL: @fadd_nnan_keep(109; INTERESTING: fadd nnan110; RESULT: fadd nnan float111define float @fadd_nnan_keep(float %a, float %b) {112  %op = fadd nnan float %a, %b113  ret float %op114}115 116; CHECK-LABEL: @fadd_ninf_none(117; INTERESTING: = fadd118; RESULT: fadd float119define float @fadd_ninf_none(float %a, float %b) {120  %op = fadd ninf float %a, %b121  ret float %op122}123 124; CHECK-LABEL: @fadd_ninf_keep(125; INTERESTING: fadd ninf126; RESULT: fadd ninf float127define float @fadd_ninf_keep(float %a, float %b) {128  %op = fadd ninf float %a, %b129  ret float %op130}131 132; CHECK-LABEL: @fadd_nsz_none(133; INTERESTING: = fadd134; RESULT: fadd float135define float @fadd_nsz_none(float %a, float %b) {136  %op = fadd nsz float %a, %b137  ret float %op138}139 140; CHECK-LABEL: @fadd_nsz_keep(141; INTERESTING: fadd nsz142; RESULT: fadd nsz float143define float @fadd_nsz_keep(float %a, float %b) {144  %op = fadd nsz float %a, %b145  ret float %op146}147 148; CHECK-LABEL: @fadd_arcp_none(149; INTERESTING: = fadd150; RESULT: fadd float151define float @fadd_arcp_none(float %a, float %b) {152  %op = fadd arcp float %a, %b153  ret float %op154}155 156; CHECK-LABEL: @fadd_arcp_keep(157; INTERESTING: fadd arcp158; RESULT: fadd arcp float159define float @fadd_arcp_keep(float %a, float %b) {160  %op = fadd arcp float %a, %b161  ret float %op162}163 164; CHECK-LABEL: @fadd_contract_none(165; INTERESTING: = fadd166; RESULT: fadd float167define float @fadd_contract_none(float %a, float %b) {168  %op = fadd contract float %a, %b169  ret float %op170}171 172; CHECK-LABEL: @fadd_contract_keep(173; INTERESTING: fadd contract174; RESULT: fadd contract float175define float @fadd_contract_keep(float %a, float %b) {176  %op = fadd contract float %a, %b177  ret float %op178}179 180; CHECK-LABEL: @fadd_afn_none(181; INTERESTING: = fadd182; RESULT: fadd float183define float @fadd_afn_none(float %a, float %b) {184  %op = fadd afn float %a, %b185  ret float %op186}187 188; CHECK-LABEL: @fadd_afn_keep(189; INTERESTING: fadd afn190; RESULT: fadd afn float191define float @fadd_afn_keep(float %a, float %b) {192  %op = fadd afn float %a, %b193  ret float %op194}195 196; CHECK-LABEL: @fadd_fast_none(197; INTERESTING: = fadd198; RESULT: fadd float199define float @fadd_fast_none(float %a, float %b) {200  %op = fadd fast float %a, %b201  ret float %op202}203 204; CHECK-LABEL: @fadd_nnan_ninf_keep_nnan(205; INTERESTING: nnan206; RESULT: fadd nnan float207define float @fadd_nnan_ninf_keep_nnan(float %a, float %b) {208  %op = fadd nnan ninf float %a, %b209  ret float %op210}211 212; CHECK-LABEL: @zext_nneg_drop(213; INTERESTING: = zext214; RESULT: zext i32215define i64 @zext_nneg_drop(i32 %a) {216  %op = zext nneg i32 %a to i64217  ret i64 %op218}219 220; CHECK-LABEL: @zext_nneg_keep(221; INTERESTING: = zext nneg222; RESULT: zext nneg i32223define i64 @zext_nneg_keep(i32 %a) {224  %op = zext nneg i32 %a to i64225  ret i64 %op226}227 228; CHECK-LABEL: @or_disjoint_drop(229; INTERESTING: = or230; RESULT: or i32231define i32 @or_disjoint_drop(i32 %a, i32 %b) {232  %op = or disjoint i32 %a, %b233  ret i32 %op234}235 236; CHECK-LABEL: @or_disjoint_keep(237; INTERESTING: = or disjoint238; RESULT: or disjoint i32239define i32 @or_disjoint_keep(i32 %a, i32 %b) {240  %op = or disjoint i32 %a, %b241  ret i32 %op242}243 244; CHECK-LABEL: @trunc_nuw_drop(245; INTERESTING: = trunc246; RESULT: trunc i64247define i32 @trunc_nuw_drop(i64 %a) {248  %op = trunc nuw i64 %a to i32249  ret i32 %op250}251 252; CHECK-LABEL: @trunc_nuw_keep(253; INTERESTING: = trunc nuw254; RESULT: trunc nuw i64255define i32 @trunc_nuw_keep(i64 %a) {256  %op = trunc nuw i64 %a to i32257  ret i32 %op258}259 260; CHECK-LABEL: @trunc_nsw_drop(261; INTERESTING: = trunc262; RESULT: trunc i64263define i32 @trunc_nsw_drop(i64 %a) {264  %op = trunc nsw i64 %a to i32265  ret i32 %op266}267 268; CHECK-LABEL: @trunc_nsw_keep(269; INTERESTING: = trunc nsw270; RESULT: trunc nsw i64271define i32 @trunc_nsw_keep(i64 %a) {272  %op = trunc nsw i64 %a to i32273  ret i32 %op274}275 276; CHECK-LABEL: @icmp_samesign_drop(277; INTERESTING: = icmp278; RESULT: icmp ult i32279define i1 @icmp_samesign_drop(i32 %a) {280  %op = icmp samesign ult i32 %a, 10281  ret i1 %op282}283 284; CHECK-LABEL: @icmp_samesign_keep(285; INTERESTING: = icmp samesign286; RESULT: icmp samesign ult i32287define i1 @icmp_samesign_keep(i32 %a) {288  %op = icmp samesign ult i32 %a, 10289  ret i1 %op290}291