mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Cast MO.getImm() to unsigned before comparing with an unsigned limit.
llvm-svn: 81318
This commit is contained in:
parent
a78433a090
commit
91e719a6a1
@ -504,7 +504,7 @@ Thumb2SizeReduce::ReduceToNarrow(MachineBasicBlock &MBB, MachineInstr *MI,
|
||||
return false;
|
||||
} else if (MO.isImm() &&
|
||||
!TID.OpInfo[i].isPredicate()) {
|
||||
if (MO.getImm() > Limit || (MO.getImm() & (Scale-1)) != 0)
|
||||
if (((unsigned)MO.getImm()) > Limit || (MO.getImm() & (Scale-1)) != 0)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ define i1 @f2(i32 %a) {
|
||||
; 0xcc00cc00 = 3422604288
|
||||
define i1 @f3(i32 %a) {
|
||||
; CHECK: f3:
|
||||
; CHECK: cmp r0, #-872363008
|
||||
; CHECK: cmp.w r0, #-872363008
|
||||
%tmp = icmp ne i32 %a, 3422604288
|
||||
ret i1 %tmp
|
||||
}
|
||||
@ -27,7 +27,7 @@ define i1 @f3(i32 %a) {
|
||||
; 0xdddddddd = 3722304989
|
||||
define i1 @f4(i32 %a) {
|
||||
; CHECK: f4:
|
||||
; CHECK: cmp r0, #-572662307
|
||||
; CHECK: cmp.w r0, #-572662307
|
||||
%tmp = icmp ne i32 %a, 3722304989
|
||||
ret i1 %tmp
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user