If it's a post ban, and it ALSO had a pistol grip on the rifle, and it had a screw off compensator that was not permanently pinned and/or welded, it would be illegal. that's why RRA blind pins and welds their muzzle attachments. There is a solution to getting the one piece handguards on (see bottom); but first:
The BATF rules that I hate to recite:
Semiautomatic assault weapon: A semiautomatic rifle that has an ability to accept a detachable
magazine and has at least 2 of--
(1) A folding or telescoping stock,
(2) A pistol grip that protrudes conspicuously beneath the action of
the weapon,
(3) A bayonet mount,
(4) A flash suppressor or threaded barrel designed to accommodate a
flash suppressor, and
(5) A grenade launcher;
You cannot own weapon that meets the definition of a semiautomatic assault rifle unless you are currently employed as a law enforcement officer or it was a complete rifle before the AWB in '94. I know former LEOs that can't even own one, because they are not actively employed with a law enforcement agency. It is a truly a pathetic, emasculating set of rules we must abide by.
http://www.atf.treas.gov/regulations/27cfr178.htm
HOWEVER... if it is blind-pinned and welded...and you are handy with tools: There is a procedure for removing the compensator, and replacing it to meet legal specifications, as long as it only has the blind pin is just welded over and is not actually welded to the barrel physically. You must sacrifice the brake, so you would have to order a new one before starting. This procedure is to put the upper into a vise (recommend barrel grips), cover the exposed barrel with heavy tape to prevent accidental damage, (CAREFULLY) grind down the area over the welded over pinhole on the compensator (usually on the bottom aspect)until the top of the pin can be seen, mill around the pin itself until enough room around the pin exists to loosen and pull out the pin with needle-tip locking pliers, unscrew the compensator and throw it away. now you have an illegal condition if you have a pistol grip on the rifle, so you want to take off the pistol grip to make it legal in the interim (watch out for the spring-loaded selector detente), but do not delay in putting your handguard or whatever on and installing your new muzzle device. To do so mark the barrel with grease pencil so you know exactly where the hole for the pin is, then screw the new compensator on,(probably 1/2 RH threads), drill the hole for pin in the compensator to line up with the existing partial depth hole in the barrel threads, drive the pin in, then weld over the hole, grind, polish and reblue. You are Done, put your pistol grip back on (with selector detent and spring) as now this is legal since you don’t have a usable threaded barrel anymore.
Again, only try this if you are handy and have the right tools and parts on hand (new compensator, pin, welding supplies). Remember, if it is a post-ban you cannot have the pistol grip and (usable)threaded barrel on the rifle on at the same time, unless the threads are covered with a permanently affixed post-ban legal muzzle device, such as muzzle brake or compensator. In fact, it could be considered illegal to even have a pistol grip in the same location where it could be readily assembled to comprise a postban rifle with a both usable threaded muzzle and a pistol grip, which would make a rifle that meets the definition of a semiautomatic assault weapon, per BATF rules. (This is also covered in http://www.atf.treas.gov/regulations/27cfr178.htm). You may want to give your pistol grip to someone at a different location while you are performing the procedure, so you won't be in violation in any way.
Also to consider: If you make a mistake, you could possibly void your factory warranty.
Just be aware. Much can be done, but one should strive to comply with the law.