brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 98efb30 Raw
51 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mtriple=msp430-- -msp430-no-legal-immediate=true < %s | FileCheck %s3 4; Test case for the following transformation in TargetLowering::SimplifySetCC5; (X & -256) == 256 -> (X >> 8) == 16define i16 @testSimplifySetCC_2(i16 %x) {7; CHECK-LABEL: testSimplifySetCC_2:8; CHECK:       ; %bb.0: ; %entry9; CHECK-NEXT:    and #-64, r1210; CHECK-NEXT:    cmp #64, r1211; CHECK-NEXT:    mov r2, r1212; CHECK-NEXT:    rra r1213; CHECK-NEXT:    and #1, r1214; CHECK-NEXT:    ret15entry:16  %and = and i16 %x, -6417  %cmp = icmp eq i16 %and, 6418  %conv = zext i1 %cmp to i1619  ret i16 %conv20}21 22; Test case for the following transformation in TargetLowering::SimplifySetCC23; X >  0x0ffffffff -> (X >> 32) >= 124define i16 @testSimplifySetCC_3(i16 %x) {25; CHECK-LABEL: testSimplifySetCC_3:26; CHECK:       ; %bb.0: ; %entry27; CHECK-NEXT:    cmp #64, r1228; CHECK-NEXT:    mov r2, r1229; CHECK-NEXT:    and #1, r1230; CHECK-NEXT:    ret31entry:32  %cmp = icmp ugt i16 %x, 6333  %conv = zext i1 %cmp to i1634  ret i16 %conv35}36 37; Test case for the following transformation in TargetLowering::SimplifySetCC38; X <  0x100000000 -> (X >> 32) <  139define i16 @testSimplifySetCC_4(i16 %x) {40; CHECK-LABEL: testSimplifySetCC_4:41; CHECK:       ; %bb.0: ; %entry42; CHECK-NEXT:    cmp #64, r1243; CHECK-NEXT:    mov #1, r1244; CHECK-NEXT:    bic r2, r1245; CHECK-NEXT:    ret46entry:47  %cmp = icmp ult i16 %x, 6448  %conv = zext i1 %cmp to i1649  ret i16 %conv50}51