brintos

brintos / llvm-project-archived public Read only

0
0
Text · 441 B · 1b5b726 Raw
16 lines · plain
1; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- -o %t2; RUN: grep slwi %t3; RUN: not grep addi %t4; RUN: not grep rlwinm %t5 6define i32 @test(i32 %A) {7        ;; shift8        %B = mul i32 %A, 8              ; <i32> [#uses=1]9        ;; dead, no demanded bits.10        %C = add i32 %B, 7              ; <i32> [#uses=1]11        ;; dead once add is gone.12        %D = and i32 %C, -8             ; <i32> [#uses=1]13        ret i32 %D14}15 16